def testIsAllowedToUploadProposalsOn(self):
    test_resolver = auth.PermissionResolver('task')
    email_one = 'user1@example.com'
    email_two = 'user2@example.com'

    setattr(auth.settings, 'ENABLE_PROPOSALS_GROUP', True)
    setattr(auth.settings, 'PROPOSALS_GROUP', 'group')

    self.mox.StubOutWithMock(auth, 'DoUserAuth')
    self.mox.StubOutWithMock(auth.PermissionResolver, '_IsAllowedToPropose')
    auth.PermissionResolver._IsAllowedToPropose().AndReturn(True)
    auth.PermissionResolver._IsAllowedToPropose().AndReturn(False)

    self.mox.ReplayAll()
    test_resolver.email = email_one
    self.assertTrue(test_resolver._IsAllowedToUpload())
    test_resolver.email = email_two
    self.assertFalse(test_resolver._IsAllowedToUpload())
    self.mox.VerifyAll()
Test PermissionResolver._IsAllowedToUpload() without proposals.
dataset/ETHPy150Open google/simian/src/tests/simian/mac/common/auth_test.py/AuthModuleTest.testIsAllowedToUploadProposalsOn