WIP: init testing #2

Draft
logan wants to merge 7 commits from implement-unit-testing into main
Showing only changes of commit 48beb79922 - Show all commits

View File

@@ -18,6 +18,13 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')
# Since we cannot edit the source code, we mock the module here to allow tests to run. # Since we cannot edit the source code, we mock the module here to allow tests to run.
mock_models = types.ModuleType("models.models") mock_models = types.ModuleType("models.models")
class MockTerminalConfig(BaseModel):
pass
class MockTalkgroupTag(BaseModel):
tagDec: int
tagName: str
class MockDecodeMode: class MockDecodeMode:
P25 = "P25" P25 = "P25"
ANALOG = "ANALOG" ANALOG = "ANALOG"
@@ -79,12 +86,6 @@ class MockMetadataStreamConfig(BaseModel):
class MockMetadataConfig(BaseModel): class MockMetadataConfig(BaseModel):
streams: List[MockMetadataStreamConfig] streams: List[MockMetadataStreamConfig]
class MockTerminalConfig(BaseModel):
pass
class MockTalkgroupTag(BaseModel):
tagDec: int
tagName: str
mock_models.ConfigGenerator = MockConfigGenerator mock_models.ConfigGenerator = MockConfigGenerator
mock_models.DecodeMode = MockDecodeMode mock_models.DecodeMode = MockDecodeMode