'Test we can delete multiple attributes at once.'

@DeletionTest
def testMultiDeleteAttributes(self):

    test_rows = [('aff4:/row/%i' % i) for i in range(0, 10)]
    predicate_1 = 'metadata:predicate1'
    predicate_2 = 'metadata:predicate2'
    for row in test_rows:
        data_store.DB.Set(row, predicate_1, 'hello', token=self.token)
        data_store.DB.Set(row, predicate_2, 'hello', token=self.token)
    self.assertEqual(10, sum((1 for _ in data_store.DB.ScanAttribute('aff4:/row/', predicate_1, token=self.token))))
    self.assertEqual(10, sum((1 for _ in data_store.DB.ScanAttribute('aff4:/row/', predicate_2, token=self.token))))
    data_store.DB.MultiDeleteAttributes(test_rows, [predicate_1, predicate_2], token=self.token)
    self.assertEqual(0, sum((1 for _ in data_store.DB.ScanAttribute('aff4:/row/', predicate_1, token=self.token))))
    self.assertEqual(0, sum((1 for _ in data_store.DB.ScanAttribute('aff4:/row/', predicate_2, token=self.token))))
