Esempio n. 1
0
 def setUp(self):
     super(TopicTests, self).setUp()
     self._mox = mox.Mox()
     self._me = USER
     User.create(**self._me)
     self._mox.StubOutWithMock(APIHandler,
                               'get_current_user', use_mock_anything=True)
     APIHandler.get_current_user().AndReturn(self._me['username'])
     self._mox.ReplayAll()
Esempio n. 2
0
 def setUp(self):
     super(UsersTests, self).setUp()
     self._mox = mox.Mox()
     self._other = DATA
     self._me = {
         'username': '******',
         'password': '******',
         'email': '*****@*****.**',
     }
     User.create(**self._me)
     User.create(**self._other)
     self._mox.StubOutWithMock(APIHandler,
                               'get_current_user', use_mock_anything=True)
     APIHandler.get_current_user().AndReturn(self._me['username'])
     self._mox.ReplayAll()