예제 #1
0
 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)
예제 #2
0
def disconnect():
    """ disconnect from the database """
    app.logger.info('removing session ...')
    Customer.disconnect()