Exemplo n.º 1
0
    def test_map_zone_no_active_function(self) -> None:
        """Test map a zone without active function"""
        with open(path("files/responses/zone_no_active_function"), "r") as file:
            zone_file = json.loads(file.read())

        zone = mapper.map_zone(zone_file)
        self.assertEqual(ActiveFunction.STANDBY, zone.active_function)
Exemplo n.º 2
0
 def test_map_zone_empty(self) -> None:
     """Test map no zone."""
     zone = mapper.map_zone({})
     self.assertIsNone(zone)
Exemplo n.º 3
0
 def test_map_zone_quickveto(self) -> None:
     with open(path("files/responses/zone_no_quickveto"), "r") as file:
         raw_zone = json.loads(file.read())
         zone = mapper.map_zone(raw_zone)
         self.assertIsNotNone(zone)
         self.assertIsNone(zone.quick_veto)