Example #1
0
 def test_get_data_from_exists_user(self):
     data = UserFactory.create()
     u = user.get(data.username)
     expect(u.username).to_equal(data.username)
     expect(u.email).to_equal(data.email)
Example #2
0
 def test_get_user_not_found(self):
     u = user.get("not_a_exist_user")
     expect(u).to_be_null()
Example #3
0
 def get_current_username(self):
     user = self.get_current_user()
     if user is None: return ""
     return user.get("name", "")