def testDoOAuthAuthSuccess(self):
    self.mox.StubOutWithMock(auth.oauth, 'get_current_user')
    self.mox.StubOutWithMock(auth, 'IsAdminUser')
    self.mox.StubOutWithMock(auth.models.KeyValueCache, 'MemcacheWrappedGet')
    self.mox.StubOutWithMock(auth.util, 'Deserialize')

    mock_user = self.mox.CreateMockAnything()
    email = 'foouser@example.com'
    auth.settings.OAUTH_USERS = []
    oauth_users = [email]

    auth.oauth.get_current_user().AndReturn(mock_user)
    mock_user.email().AndReturn(email)
    auth.IsAdminUser(email).AndReturn(True)
    auth.models.KeyValueCache.MemcacheWrappedGet(
        'oauth_users', 'text_value').AndReturn(oauth_users)
    auth.util.Deserialize(oauth_users).AndReturn(oauth_users)

    self.mox.ReplayAll()
    auth.DoOAuthAuth(is_admin=True)
    self.mox.VerifyAll()
Check if the user has just joined the given room (so should
dataset/ETHPy150Open google/simian/src/tests/simian/mac/common/auth_test.py/AuthModuleTest.testDoOAuthAuthSuccess--crossover with--dataset/ETHPy150Open matrix-org/synapse/synapse/handlers/sync.py/SyncHandler.check_joined_room