@override_settings(DATA_REPOSITORY_DIR='/some/dir')
def test_get_english_pofile(self):
    legalcode = LegalCodeFactory(language_code='es')
    legalcode_en = LegalCodeFactory(license=legalcode.license, language_code=DEFAULT_LANGUAGE_CODE)
    test_pofile = polib.POFile()
    with mock.patch.object(License, 'get_legalcode_for_language_code') as mock_glfl:
        mock_glfl.return_value = legalcode_en
        with mock.patch.object(legalcode_en, 'get_pofile') as mock_gp:
            mock_gp.return_value = test_pofile
            self.assertEqual(test_pofile, legalcode.get_english_pofile())
            self.assertEqual(test_pofile, legalcode_en.get_english_pofile())
    mock_glfl.assert_called_with(DEFAULT_LANGUAGE_CODE)
    mock_gp.assert_called_with()
@override_settings(DATA_REPOSITORY_DIR='/some/dir')
def test_get_english_pofile(self):
    legalcode = LegalCodeFactory(language_code='es')
    legalcode_en = LegalCodeFactory(license=legalcode.license, language_code=DEFAULT_LANGUAGE_CODE)
    test_pofile = polib.POFile()
    with mock.patch.object(License, 'get_legalcode_for_language_code') as mock_glfl:
        mock_glfl.return_value = legalcode_en
        with mock.patch.object(legalcode_en, 'get_pofile') as mock_gp:
            mock_gp.return_value = test_pofile
            self.assertEqual(test_pofile, legalcode.get_english_pofile())
            self.assertEqual(test_pofile, legalcode_en.get_english_pofile())
    mock_glfl.assert_called_with(DEFAULT_LANGUAGE_CODE)
    mock_gp.assert_called_with()