Esempio n. 1
0
 def test_user_is_created(self, get_mock, create_mock, profile_mock):
     email = '*****@*****.**'
     user = inviter.RawUser('Someone', email)
     result = inviter.create_user(user)
     eq_(result, 1)
     get_mock.assert_called_once_with(email=email)
     create_mock.assert_called_once_with(email, first_name='Someone')
     profile_mock.assert_called_once_with(user=1)
Esempio n. 2
0
 def test_user_is_found_returns_none(self, get_mock):
     user = inviter.RawUser('Someone', '*****@*****.**')
     result = inviter.create_user(user)
     eq_(result, None)
     get_mock.assert_called_once()