def setUp(self): self.url = "http://importpython.com/newsletter/no/60/" test_fixture = 'fixture_test_import_importpython_test_get_blocks.txt' self.patcher = patch( 'digest.management.commands.import_importpython.urlopen') self.urlopen_mock = self.patcher.start() self.urlopen_mock.return_value = MockResponse( read_fixture(test_fixture)) self.parser = ImportPythonParser()