def test_job_should_emit_status_for_all_urls(self): first_domain = Domain("http://example.com") first_domain.crawled = True second_domain = Domain("http://example.com/2") job = Job([first_domain,second_domain]) self.assertEqual(job.get_status()["completed"], 1) self.assertEqual(job.get_status()["inprogress"], 1)
def test_job_should_emit_status_for_crawled_urls(self): first_domain = Domain("http://example.com") first_domain.crawled = True job = Job([first_domain]) self.assertEqual(job.get_status()["completed"], 1)