示例#1
0
    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
示例#2
0
 def setUp(self):
     super(TestCreateUser, self).setUp()
     self.username = "******"
     self.passw = "derpfestor"
     create(self.session, self.username, self.passw)
     create(self.session, "derpier", "derpfestor2")
示例#3
0
    def test_create_user(self):
        create(self.session, "derp", "derpfestor")

        assert self.session.query(User).count() is 1
示例#4
0
    def test_create_two_users(self):
        create(self.session, "derp", "derpfestor")
        create(self.session, "derpier", "derpfestor2")

        assert self.session.query(User).count() is 2
示例#5
0
 def setUp(self):
     super(TestKeys, self).setUp()
     self.user = users.create(self.session, "derp", "derpfestor")
     self.main_key = create(self.session, self.user)