Skip to content

Commit

Permalink
Changed test file structure to better represent caribou structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danidite committed Aug 20, 2024
1 parent 1c3f270 commit 6662f34
Show file tree
Hide file tree
Showing 30 changed files with 26 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
26 changes: 26 additions & 0 deletions caribou/tests/monitors/test_monitor.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import unittest
from unittest.mock import patch, MagicMock
from caribou.common.models.endpoints import Endpoints
from caribou.monitors.monitor import Monitor


class ConcreteMonitor(Monitor):
def check(self) -> None:
pass


class TestMonitor(unittest.TestCase):
def test_check_not_implemented(self):
with self.assertRaises(TypeError):
Monitor()

def test_check_implemented(self):
monitor = ConcreteMonitor()
try:
monitor.check()
except NotImplementedError:
self.fail("check() raised NotImplementedError unexpectedly!")


if __name__ == "__main__":
unittest.main()

0 comments on commit 6662f34

Please sign in to comment.