Fix test establishment
This commit is contained in:
parent
adbc22f1f6
commit
87708df084
|
|
@ -28,20 +28,14 @@ class BaseTestCase(APITestCase):
|
|||
self.establishment_type = EstablishmentType.objects.create(name="Test establishment type")
|
||||
|
||||
# Create lang object
|
||||
self.lang = Language.objects.create(
|
||||
title='English',
|
||||
locale='en-GB'
|
||||
self.lang = Language.objects.get(
|
||||
title='Russia',
|
||||
locale='ru-RU'
|
||||
)
|
||||
self.lang.save()
|
||||
|
||||
self.country_ru = Country.objects.create(
|
||||
name='{"ru-RU":"Russia"}',
|
||||
code='23',
|
||||
low_price=15,
|
||||
high_price=150000,
|
||||
self.country_ru = Country.objects.get(
|
||||
name={"en-GB": "Russian"}
|
||||
)
|
||||
self.country_ru.languages.add(self.lang)
|
||||
self.country_ru.save()
|
||||
|
||||
self.region = Region.objects.create(name='Moscow area', code='01',
|
||||
country=self.country_ru)
|
||||
|
|
@ -331,7 +325,7 @@ class EstablishmentWebTagTests(BaseTestCase):
|
|||
|
||||
def test_tag_Read(self):
|
||||
response = self.client.get('/api/web/establishments/tags/', format='json')
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND)
|
||||
|
||||
|
||||
class EstablishmentWebSlugTests(ChildTestCase):
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user