Exemplo n.º 1
0
def test_check_errors(get_job, error_count, expected_messages):
    job = get_job
    job.metadata = {"scrapystats": error_count}
    job.key = "112358/13/21"

    result = check_errors(job)
    assert result == create_result("Job Errors", expected_messages)
Exemplo n.º 2
0
 def compare_metadata(self, source_job, target_job):
     self.save_result(
         metadata_rules.compare_spider_names(source_job, target_job))
     self.save_result(metadata_rules.check_errors(source_job, target_job))
     self.save_result(
         metadata_rules.compare_number_of_scraped_items(
             source_job, target_job))
     self.save_result(coverage_rules.get_difference(source_job, target_job))
     self.save_result(
         metadata_rules.compare_response_ratio(source_job, target_job))
     self.save_result(metadata_rules.compare_runtime(
         source_job, target_job))
     self.save_result(
         metadata_rules.compare_finish_time(source_job, target_job))
Exemplo n.º 3
0
 def check_metadata(self, job):
     self.save_result(metadata_rules.check_outcome(job))
     self.save_result(metadata_rules.check_errors(job))