-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed test file structure to better represent caribou structure.
- Loading branch information
Showing
30 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |