def test_client_globals_user(self): u = User() u.save() u = User() u.save() eq_(len(User.objects()), 2) eq_(len(self.client.globals(u.id)["user"]), 1)
def test_add_user_add_any_attributes(self): u = User() u.favotire = 'sports' u.save() eq_(u.id, User.objects(favotire='sports').only('id').first().id)
def test_add_user(self): u = User() u.save() eq_(u.id, User.objects().only('id').first().id)
def teardown(self): Scenario.objects().delete() User.objects().delete() History.objects().delete() Intent.objects().delete()
def test_get_user_id(self): u = self.client.create_new_user(**{"aaa": "aaa"}) eq_(u.id, User.objects().only('id').first().id) user_id = self.client.get_user_id(**{"aaa": "aaa"}) eq_(user_id, u.id)
def test_get_user_attributes(self): u = self.client.create_new_user() eq_(u.id, User.objects().only('id').first().id) get_u = self.client.get_user_attributes(u.id) eq_(get_u, {})
def test_create_new_user_with_option(self): u = self.client.create_new_user(**{"aaa": "aaa"}) eq_(u.id, User.objects().only('id').first().id) eq_(u.aaa, "aaa")
def test_create_new_user(self): u = self.client.create_new_user() eq_(u.id, User.objects().only('id').first().id)