def test_delete_partial(self): delete(self.table.date >= '2014-01-13') self.assertEqual(['hustle:__test_drop_imps:2014-01-10', 'hustle:__test_drop_imps:2014-01-11', 'hustle:__test_drop_imps:2014-01-12'], get_partitions(self.table)) tags = self.ddfs.list(Table.base_tag(self.table._name)) self.assertEqual(len(tags), 4) self.assertIn("hustle:__test_drop_imps", tags) drop(self.table) with self.assertRaises(ValueError): delete(self.table.site_id == 'foobar') delete(self.tale.url)
def test_drop(self): drop(self.table) self.assertEqual([], get_partitions(self.table)) tags = self.ddfs.list(Table.base_tag(self.table._name)) self.assertEqual(len(tags), 0)
def test_delete_all(self): delete(self.table) self.assertEqual([], get_partitions(self.table)) tags = self.ddfs.list(Table.base_tag(self.table._name)) self.assertEqual(len(tags), 1) self.assertEqual(tags[0], "hustle:__test_drop_imps")