@override_settings(DATA_REPOSITORY_DIR='/some/dir')
def test_get_translation_object(self):
    legalcode = LegalCodeFactory(license__version='4.0', license__license_code='by-sa', language_code='de')
    with mock.patch('licenses.models.get_translation_object') as mock_djt:
        legalcode.get_translation_object()
    mock_djt.assert_called_with(domain='by-sa_40', django_language_code='de')
@override_settings(DATA_REPOSITORY_DIR='/some/dir')
def test_get_translation_object(self):
    legalcode = LegalCodeFactory(license__version='4.0', license__license_code='by-sa', language_code='de')
    with mock.patch('licenses.models.get_translation_object') as mock_djt:
        legalcode.get_translation_object()
    mock_djt.assert_called_with(domain='by-sa_40', django_language_code='de')