mirror of
https://github.com/Noettore/lagomareGateKeeperBot.git
synced 2025-10-15 11:36:40 +02:00
Still refactoring and unit tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import unittest
|
||||
|
||||
from models import Gate, Status
|
||||
from repository import GatesRepository
|
||||
from src.models import Gate, Status
|
||||
from src.repository import GatesRepository
|
||||
|
||||
|
||||
class TestGatesRepository(unittest.TestCase):
|
||||
@@ -15,7 +15,7 @@ class TestGatesRepository(unittest.TestCase):
|
||||
|
||||
result = self.repo.get_by_key(gate_key)
|
||||
|
||||
self.assertEqual(expected_gate.id, result.id)
|
||||
self.assertEqual(expected_gate.gid, result.gid)
|
||||
self.assertEqual(expected_gate.name, result.name)
|
||||
self.assertEqual(expected_gate.status, result.status)
|
||||
|
||||
@@ -33,7 +33,7 @@ class TestGatesRepository(unittest.TestCase):
|
||||
|
||||
self.assertEqual(len(enabled_gate_ids), len(result))
|
||||
self.assertEqual(
|
||||
sorted(enabled_gate_ids), sorted([gate.id for gate in result])
|
||||
sorted(enabled_gate_ids), sorted([gate.gid for gate in result])
|
||||
)
|
||||
|
||||
for gate in result:
|
||||
|
Reference in New Issue
Block a user