def test_disconnect(self): """ Test Disconnet """ Customer.disconnect() customer = Customer(firstname="John", lastname="Doe", email="*****@*****.**", subscribed=False, address1="123 Main St", address2="1B", city="New York", country="USA", province="NY", zip="12310") self.assertRaises(AttributeError, customer.save)
def disconnect(): """ disconnect from the database """ app.logger.info('removing session ...') Customer.disconnect()