Commit c8d71e77 authored by Michal Čihař's avatar Michal Čihař

Add test set covering android resources

parent 0418e79b
...@@ -94,6 +94,17 @@ class BasicViewTest(ViewTestCase): ...@@ -94,6 +94,17 @@ class BasicViewTest(ViewTestCase):
self.assertContains(response, 'Test/Test') self.assertContains(response, 'Test/Test')
class BasicResourceViewTest(BasicViewTest):
def create_subproject(self, file_format='aresource',
mask='android/values-*/strings.xml',
template='android/values/strings.xml'):
return super(BasicResourceViewTest, self).create_subproject(
file_format,
mask,
template,
)
class ExportsViewTest(ViewTestCase): class ExportsViewTest(ViewTestCase):
def test_view_rss(self): def test_view_rss(self):
response = self.client.get( response = self.client.get(
...@@ -139,6 +150,17 @@ class ExportsViewTest(ViewTestCase): ...@@ -139,6 +150,17 @@ class ExportsViewTest(ViewTestCase):
self.assertEqual(parsed[0]['name'], 'Czech') self.assertEqual(parsed[0]['name'], 'Czech')
class ExportsResourceViewTest(ExportsViewTest):
def create_subproject(self, file_format='aresource',
mask='android/values-*/strings.xml',
template='android/values/strings.xml'):
return super(ExportsResourceViewTest, self).create_subproject(
file_format,
mask,
template,
)
class EditTest(ViewTestCase): class EditTest(ViewTestCase):
''' '''
Tests for manipulating translation. Tests for manipulating translation.
...@@ -213,3 +235,14 @@ class EditTest(ViewTestCase): ...@@ -213,3 +235,14 @@ class EditTest(ViewTestCase):
self.assertFalse(self.translation.git_needs_push()) self.assertFalse(self.translation.git_needs_push())
self.assertFalse(self.subproject.git_needs_push()) self.assertFalse(self.subproject.git_needs_push())
self.assertFalse(self.subproject.project.git_needs_push()) self.assertFalse(self.subproject.project.git_needs_push())
class EditResourceTest(EditTest):
def create_subproject(self, file_format='aresource',
mask='android/values-*/strings.xml',
template='android/values/strings.xml'):
return super(EditResourceTest, self).create_subproject(
file_format,
mask,
template,
)
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