Пример #1
0
 def test_load_fixture(self):
     """Test loaded fixture matches database content."""
     destination = FixtureDir('import').get_file_path('angouleme.json')
     with mock.patch.object(Downloader, 'download') as mock_func:
         cmd = Command()
         cmd.load_fixture(source='/abcdefg.json',
                          destination=destination,
                          force=True)
         Fixture(destination).assertNoDiff()
         mock_func.assert_called_with(source='/abcdefg.json',
                                      destination=destination,
                                      force=True)
 def test_load_fixture(self):
     """Test loaded fixture matches database content."""
     destination = 'cities_light/tests/fixtures/angouleme.json'
     with mock.patch.object(Downloader, 'download') as mock_func:
         cmd = Command()
         cmd.load_fixture(source='/abcdefg.json',
                          destination=destination,
                          force=True)
         Fixture(destination).assertNoDiff()
         mock_func.assert_called_with(source='/abcdefg.json',
                                      destination=destination,
                                      force=True)
 def test_load_fixture(self):
     """Test loaded fixture matches database content."""
     destination = FixtureDir('import').get_file_path('angouleme.json')
     with mock.patch.object(Downloader, 'download') as mock_func:
         cmd = Command()
         cmd.load_fixture(source='/abcdefg.json',
                          destination=destination,
                          force=True)
         Fixture(destination).assertNoDiff()
         mock_func.assert_called_with(source='/abcdefg.json',
                                      destination=destination,
                                      force=True)