Пример #1
0
 def test_build_dict_known(self):
     city = City()
     city.known_for = "food"
     
     city_dict = city.build_dictionary()
     assert city_dict["known for"] == "food"
Пример #2
0
 def test_build_dict_calamity(self):
     city = City()
     city.calamity = "doom"
     
     city_dict = city.build_dictionary()
     assert city_dict["calamity"] == "doom"
Пример #3
0
 def test_build_dict_ruler(self):
     city = City()
     city.ruler_status = "just"
     
     city_dict = city.build_dictionary()
     assert city_dict["ruler status"] == "just"
Пример #4
0
 def test_build_dict_trait(self):
     city = City()
     city.notable_trait = "river"
     
     city_dict = city.build_dictionary()
     assert city_dict["notable trait"] == "river"
Пример #5
0
 def test_build_dict_race(self):
     city = City()
     city.race_relation = "good"
     
     city_dict = city.build_dictionary()
     assert city_dict["race relation"] == "good"
Пример #6
0
 def test_build_dict_pop(self):
     city = City()
     city.population = 100
     
     city_dict = city.build_dictionary()
     assert city_dict["population"] == 100
Пример #7
0
 def test_build_dict_name(self):
     city = City()
     city.name = "test"
     
     city_dict = city.build_dictionary()
     assert city_dict["name"] == "test"
Пример #8
0
 def test_build_output_path(self):
     city = City()
     assert City.build_output_path("test") == "../output/city/test.json"
Пример #9
0
 def test_build_config_path(self):
     city = City()
     assert City.build_config_path("test") == "../config/city/test.json"