Fix tests
This commit is contained in:
parent
c50bdc8637
commit
2261875d3c
|
|
@ -5,7 +5,6 @@ from account.models import User
|
|||
from rest_framework import status
|
||||
from http.cookies import SimpleCookie
|
||||
|
||||
from django.contrib.gis.db.models import PointField
|
||||
from location.models import City, Region, Country
|
||||
|
||||
|
||||
|
|
@ -93,11 +92,16 @@ class RegionTests(BaseTestCase):
|
|||
self.assertEqual(response.status_code, status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
class CityTests(RegionTests):
|
||||
class CityTests(BaseTestCase):
|
||||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
self.country = Country.objects.create(
|
||||
name=json.dumps({"en-GB": "Test country"}),
|
||||
code="test"
|
||||
)
|
||||
|
||||
self.region = Region.objects.create(
|
||||
name="Test region",
|
||||
code="812",
|
||||
|
|
@ -137,6 +141,7 @@ class AddressTests(BaseTestCase):
|
|||
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
|
||||
self.country = Country.objects.create(
|
||||
name=json.dumps({"en-GB": "Test country"}),
|
||||
code="test"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user