def test_remove_all(self): """ Test dropping and recreating all tables in the database """ self._add_two_test_payments() self.assertEqual(len(Payment.all()), 2) Payment.disconnect() Payment.remove_all() self.assertEqual(len(Payment.all()), 0)
def reset_payments(): """Removes all payments from the database.""" app.logger.info('Remove all the payments inside the database') # pylint: disable=no-member Payment.disconnect() Payment.remove_all() return make_response('', status.HTTP_204_NO_CONTENT)