コード例 #1
0
 def test_url_is_the_authoritative_url(self):
     downloader = LocalAuthoritiesDownloader()
     url = downloader._authoritative_url()
     self.assertEqual(url, downloader._authoritative_url())
コード例 #2
0
 def test_that_the_default_url_can_be_overridden_with_an_env_var(self):
     mock_env = {'LOCAL_AUTHORITIES_DUMP_URL': 'blah'}
     with mock.patch.dict('os.environ', mock_env):
         downloader = LocalAuthoritiesDownloader()
         self.assertEqual('blah', downloader._authoritative_url())