Commit 6b32680d authored by Michal Čihař's avatar Michal Čihař

Adjust tests to nested objects

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 87f3e31c
...@@ -22,7 +22,7 @@ from django.core.urlresolvers import reverse ...@@ -22,7 +22,7 @@ from django.core.urlresolvers import reverse
from rest_framework.test import APITestCase from rest_framework.test import APITestCase
from weblate.trans.tests.utils import get_test_file, RepoTestMixin from weblate.trans.tests.utils import RepoTestMixin
class APITest(APITestCase, RepoTestMixin): class APITest(APITestCase, RepoTestMixin):
...@@ -43,7 +43,7 @@ class APITest(APITestCase, RepoTestMixin): ...@@ -43,7 +43,7 @@ class APITest(APITestCase, RepoTestMixin):
) )
self.assertEqual(len(response.data), 1) self.assertEqual(len(response.data), 1)
self.assertEqual(response.data[0]['slug'], 'test') self.assertEqual(response.data[0]['slug'], 'test')
self.assertEqual(response.data[0]['project'], 1) self.assertEqual(response.data[0]['project']['slug'], 'test')
def test_list_translations(self): def test_list_translations(self):
response = self.client.get( response = self.client.get(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment