예제 #1
0
파일: tests.py 프로젝트: jparker165/deduper
 def test_process_files(self, MockDedupManager):
     os.system("rm %s/*" % settings.RECORD_FILES_DIR)
     factories.build_fake_files(num_files=2,
     records_per_file=10)
     instance = MockDedupManager.return_value
     deduper.process_files()
     self.assertEqual(instance.dedup.call_count, 20)
예제 #2
0
파일: tests.py 프로젝트: jparker165/deduper
 def test_metrics(self):
     os.system("rm %s/*" % settings.RECORD_FILES_DIR)
     factories.build_fake_files()
     metrics = deduper.process_files()
     self.assertEqual(metrics['is_dup']['count'],
         metrics['false_negative']['count'] + metrics['true_positive']['count'])
     self.assertEqual(metrics['not_dup']['count'],
         metrics['false_positive']['count'] + metrics['true_negative']['count'])