def test_create_duplicate_user(self): create(self.session, "derp", "derpfestor") try: create(self.session, "derp", "derpfestor") except IntegrityError: assert True else: assert False assert self.session.query(User).count() is 1
def setUp(self): super(TestCreateUser, self).setUp() self.username = "******" self.passw = "derpfestor" create(self.session, self.username, self.passw) create(self.session, "derpier", "derpfestor2")
def test_create_user(self): create(self.session, "derp", "derpfestor") assert self.session.query(User).count() is 1
def test_create_two_users(self): create(self.session, "derp", "derpfestor") create(self.session, "derpier", "derpfestor2") assert self.session.query(User).count() is 2
def setUp(self): super(TestKeys, self).setUp() self.user = users.create(self.session, "derp", "derpfestor") self.main_key = create(self.session, self.user)