Exemplo n.º 1
0
    def test_team_no_access(self):
        team_key = 'test'
        data = {'name': 'Test Team', 'description': 'Test Description',
                'members': ['*****@*****.**', '*****@*****.**']}
        team = models.Team(key_name=team_key, client=self.client, **data)
        team.put()

        other_client = create_client('otherclient', 'otherclient')
        self.assertRaises(exceptions.UnauthorizedException, models.Team.get,
                          team_key, other_client)
Exemplo n.º 2
0
    def test_process_no_access(self):
        process_key = 'test'
        data = {'name': 'Test Process', 'description': 'Test Description',
                'collect_stats': True}
        process = models.Process(key_name=process_key, client=self.client,
                                 **data)
        process.put()

        other_client = create_client('otherclient', 'otherclient')
        self.assertRaises(exceptions.UnauthorizedException, models.Process.get,
                          process_key, other_client)
Exemplo n.º 3
0
    def test_request_no_access(self):
        request_key = 'test'
        process = self._create_process()
        data = {'key_name': request_key, 'client': self.client,
                'process': process, 'requestor': '*****@*****.**',
                'first_name': 'Flo', 'last_name': 'Mo'}
        request = models.Request(**data)
        request.put()

        other_client = create_client('otherclient', 'otherclient')
        self.assertRaises(exceptions.UnauthorizedException, models.Request.get,
                          request_key, other_client)
Exemplo n.º 4
0
 def setUp(self):
     super(ProcessStepTest, self).setUp()
     self.client = create_client()
Exemplo n.º 5
0
 def setUp(self):
     handler_class = RequestHandler
     super(RequestTest, self).setUp()
     self.client = create_client()
Exemplo n.º 6
0
 def setUp(self):
     super(WorkflowTest, self).setUp()
     self.client = create_client()
     self.hub = self.create_hub('http://pubsubhubbub.appspot.com')
     self.team = self.load_team('sample_team.json')
Exemplo n.º 7
0
 def setUp(self):
     super(TeamTest, self).setUp()
     self.client = create_client()
Exemplo n.º 8
0
 def setUp(self):
     handler_class = ExecutionHandler
     super(ExecutionTest, self).setUp()
     self.client = create_client()