Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck committed Aug 19, 2024
1 parent 8b9b488 commit c937f21
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/test_model_tool_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

class TestModelToolRepository(TestCase):

def test_init(self) -> None:
def test_init(self) -> ToolsRepository:
c = Component(name='test-component')
s = Service(name='test-service')
t = Tool(name='test-tool')
Expand All @@ -37,6 +37,17 @@ def test_init(self) -> None:
self.assertIs(c, tuple(tr.components)[0])
self.assertIs(s, tuple(tr.services)[0])
self.assertIs(t, tuple(tr.tools)[0])
return tr

def test_filled(self) -> None:
tr = self.test_init()
self.assertEqual(3, len(tr))
self.assertTrue(tr)

def test_empty(self) -> None:
tr = ToolsRepository()
self.assertEqual(0, len(tr))
self.assertFalse(tr)

def test_unequal_different_type(self) -> None:
tr = ToolsRepository()
Expand Down

0 comments on commit c937f21

Please sign in to comment.