@override_settings(DATA_REPOSITORY_DIR='/foo')
def test_translation_filename(self):
    data = [('/foo/legalcode/de/LC_MESSAGES/by-sa_03.po', 'by-sa', '0.3', '', 'de'), ('/foo/legalcode/de/LC_MESSAGES/by-sa_03_xx.po', 'by-sa', '0.3', 'xx', 'de')]
    for (expected, license_code, version, jurisdiction, language) in data:
        with self.subTest(expected):
            license = LicenseFactory(license_code=license_code, version=version, jurisdiction_code=jurisdiction)
            self.assertEqual(expected, LegalCodeFactory(license=license, language_code=language).translation_filename())
@override_settings(DATA_REPOSITORY_DIR='/foo')
def test_translation_filename(self):
    data = [('/foo/legalcode/de/LC_MESSAGES/by-sa_03.po', 'by-sa', '0.3', , 'de'), ('/foo/legalcode/de/LC_MESSAGES/by-sa_03_xx.po', 'by-sa', '0.3', 'xx', 'de')]
    for (expected, license_code, version, jurisdiction, language) in data:
        with self.subTest(expected):
            license = LicenseFactory(license_code=license_code, version=version, jurisdiction_code=jurisdiction)
            self.assertEqual(expected, LegalCodeFactory(license=license, language_code=language).translation_filename())