Fix news tests

This commit is contained in:
Виктор Гладких 2019-10-21 16:21:14 +03:00
parent 87708df084
commit d1d092e49d

View File

@ -25,20 +25,14 @@ class BaseTestCase(APITestCase):
'refresh_token': tokkens.get('refresh_token')})
self.test_news_type = NewsType.objects.create(name="Test news type")
self.lang = Language.objects.create(
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()
role = Role.objects.create(
role=Role.CONTENT_PAGE_MANAGER,