예제 #1
0
 def test_call(self, mock_scrape):
     fp = FeaturePage.objects.create(
         feature_id=666,
         status=FeaturePage.STATUS_PARSING,
         url='https://developer.mozilla.org/en-US/_docs/hi')
     parse_page(fp.id)
     mock_scrape.assert_called_once_with(fp)
예제 #2
0
 def test_call(self, mock_scrape):
     fp = FeaturePage.objects.create(feature_id=666, status=FeaturePage.STATUS_PARSING)
     parse_page(fp.id)
     mock_scrape.assertCalledOnce(fp.id)
예제 #3
0
 def test_call(self, mock_scrape):
     fp = FeaturePage.objects.create(
         feature_id=666, status=FeaturePage.STATUS_PARSING,
         url="https://developer.mozilla.org/en-US/_docs/hi")
     parse_page(fp.id)
     mock_scrape.assert_called_once_with(fp)