forked from JABS081/AirBnB_clone_v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_place.py
69 lines (55 loc) · 1.68 KB
/
test_place.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/python3
""" """
from tests.test_models.test_base_model import test_basemodel
from models.place import Place
class test_Place(test_basemodel):
""" """
def __init__(self, *args, **kwargs):
""" """
super().__init__(*args, **kwargs)
self.name = "Place"
self.value = Place
def test_city_id(self):
""" """
new = self.value()
self.assertEqual(type(new.city_id), str)
def test_user_id(self):
""" """
new = self.value()
self.assertEqual(type(new.user_id), str)
def test_name(self):
""" """
new = self.value()
self.assertEqual(type(new.name), str)
def test_description(self):
""" """
new = self.value()
self.assertEqual(type(new.description), str)
def test_number_rooms(self):
""" """
new = self.value()
self.assertEqual(type(new.number_rooms), int)
def test_number_bathrooms(self):
""" """
new = self.value()
self.assertEqual(type(new.number_bathrooms), int)
def test_max_guest(self):
""" """
new = self.value()
self.assertEqual(type(new.max_guest), int)
def test_price_by_night(self):
""" """
new = self.value()
self.assertEqual(type(new.price_by_night), int)
def test_latitude(self):
""" """
new = self.value()
self.assertEqual(type(new.latitude), float)
def test_longitude(self):
""" """
new = self.value()
self.assertEqual(type(new.latitude), float)
def test_amenity_ids(self):
""" """
new = self.value()
self.assertEqual(type(new.amenity_ids), list)