1 # Copyright 2023 highstreet technologies GmbH
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 from network_generation.model.python.countries import Country
16 from network_generation.model.python.type_definitions import (
27 def test_type_definitions() -> None:
28 administrative_state: AdministrativeState = AdministrativeState.LOCKED
29 assert administrative_state.name == "LOCKED"
31 address_type: AddressType = {
32 "street": "Hähnelstraße 6",
38 "country": Country.Germany,
42 == "{'street': 'Hähnelstraße 6', 'building': 'b001', "
43 + "'room': 'EG rechts', 'city': 'Berlin', 'zip': '12159', "
44 + "'state': 'Berlin', 'country': <Country.Germany: 'Germany'>}"
47 alarm_state: AlarmState = 1
48 assert alarm_state == 1
50 life_cycle_state: LifeCycleState = LifeCycleState.PLANNED
51 assert str(life_cycle_state.name) == "PLANNED"
53 operational_state: OperationalState = OperationalState.ENABLED
54 assert str(operational_state.name) == "ENABLED"
56 usage_state: UsageState = UsageState.UNUSED
57 assert str(usage_state.name) == "UNUSED"
59 utilization: Utilization = 1
60 assert utilization == 1