def test_delete_all_rql_driver_error(self): with self.app.test_request_context(): with patch.object(Interactions, 'delete_all', side_effect=RqlDriverError(None)): response = delete_all(DEFAULT_REGISTRATIONS_TABLE) self.assertRaises(RqlDriverError) self.assertEqual(response.status_code, client.INTERNAL_SERVER_ERROR)
def test_delete_all(self): with self.app.test_request_context(): with patch.object(Interactions, "delete_all", return_value={}): response = delete_all(DEFAULT_REGISTRATIONS_TABLE) self.assertEqual(response.status_code, client.OK)
def test_delete_all(self): with self.app.test_request_context(): with patch.object(Interactions, 'delete_all', return_value={}): response = delete_all(DEFAULT_REGISTRATIONS_TABLE) self.assertEqual(response.status_code, client.OK)
def delete(self): """ Deletes all records in the Registrations table """ return delete_all(DEFAULT_REGISTRATIONS_TABLE)
def delete(self): """ Deletes all records in the subscriptions table """ return delete_all(DEFAULT_SUBSCRIPTIONS_TABLE)