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

Add test for loading resx files

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 85419695
......@@ -34,6 +34,7 @@ from django.utils import timezone
from django.contrib.auth.models import Permission, User
from django.core.exceptions import ValidationError
from weblate.trans.formats import FILE_FORMATS
from weblate.trans.models import (
Project, SubProject, Source, Unit, WhiteboardMessage, Check,
get_related_units,
......@@ -301,6 +302,15 @@ class RepoTestCase(TestCase):
'xliff-mono/en.xlf',
)
def create_resx(self):
if 'resx' not in FILE_FORMATS:
raise SkipTest('resx not supported')
return self._create_subproject(
'resx',
'resx/*.resx',
'resx/en.resx',
)
def create_link(self):
parent = self.create_iphone()
return SubProject.objects.create(
......
......@@ -211,6 +211,10 @@ class SubProjectTest(RepoTestCase):
project = self.create_xliff('Resname')
self.verify_subproject(project, 1, 'en', 2, 'Hi')
def test_create_resx(self):
project = self.create_resx()
self.verify_subproject(project, 2, 'cs', 4)
def test_link(self):
project = self.create_link()
self.verify_subproject(project, 3, 'cs', 4)
......
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