コード例 #1
0
    def test_invalid_catalog(self):
        task = GenerateDumpTask()
        task.save()

        gen = DumpGenerator(task, "no_catalog")
        gen.generate()
        task.refresh_from_db()

        self.assertFalse(DumpFile.objects.filter(file_type=DumpFile.TYPE_CSV, task=task))
コード例 #2
0
    def test_dump_distribution_no_periodicity(self):
        task = GenerateDumpTask()
        task.save()
        Distribution.objects.first().enhanced_meta.get(key=meta_keys.PERIODICITY).delete()
        gen = DumpGenerator(task)
        gen.generate()
        task.refresh_from_db()

        self.assertTrue(DumpFile.objects.filter(file_type=DumpFile.TYPE_CSV, task=task))