-
Notifications
You must be signed in to change notification settings - Fork 0
/
console.py
49 lines (30 loc) · 1.28 KB
/
console.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import pdb
from models.country import Country
from models.city import City
import repositories.country_repository as country_repository
import repositories.city_repository as city_repository
city_repository.delete_all()
country_repository.delete_all()
# _________________________________________________________
country1 = Country("Italy", "60,461,826", "Italian", "Euro", "26°C")
country_repository.save(country1)
country2 = Country("Morocco", "36,910,560", "Arabic/French", "Dirham", "36°C")
country_repository.save(country2)
country3 = Country("America", "331,000,000", "English", "Dollars", "21.5°C")
country_repository.save(country3)
country4 = Country("Germany", "83,783,942", "German", "Euro", "10.2°C")
country_repository.save(country4)
# _________________________________________________________
city_1 = City("Rome", "City Break", country1)
city_repository.save(city_1)
city_2 = City("Tangier", "Near the Sea", country2)
city_repository.save(city_2)
city_3 = City("New York", "City Break", country3)
city_repository.save(city_3)
city_4 = City("Berlin", "City Break", country4)
city_repository.save(city_4)
city_5 = City("Munich", "City Break", country4)
city_repository.save(city_5)
city_6 = City("Hamburg", "City Break", country4)
city_repository.save(city_6)
pdb.set_trace()