Esempio n. 1
0
    def test_invalid_state_code(self) -> None:
        invalid_state_code = "US_XX_YYY"
        with self.assertRaises(ValueError):
            _ = StateCode(invalid_state_code)

        self.assertEqual(None, StateCode.get(invalid_state_code))
def _is_legacy_instance(system_level: SystemLevel, region_code: str,
                        ingest_instance: DirectIngestInstance) -> bool:
    return (ingest_instance.database_version(system_level,
                                             StateCode.get(region_code)) is
            SQLAlchemyStateDatabaseVersion.LEGACY)