def setUp(self):
     reply = authenticate()
     HTTPretty.register_uri(HTTPretty.POST, IDENTITY_TOKEN_URL,
                            status=200, body=json.dumps(reply))
     self.connection = Connection('a', 'dfw', password='******')
     self.agent = Mock(self.connection, AGENT_ID)
     self.url = '{0}/system/activity/{1}'.format(self.connection.host,
                                                 AGENT_ID)
 def setUp(self):
     reply = authenticate()
     HTTPretty.register_uri(HTTPretty.POST,
                            IDENTITY_TOKEN_URL,
                            status=200,
                            body=json.dumps(reply))
     self.connection = Connection('a', 'dfw', password='******')
     self.agent = Mock(self.connection, AGENT_ID)
     self.url = '{0}/system/activity/{1}'.format(self.connection.host,
                                                 AGENT_ID)
Esempio n. 3
0
def _mock_auth(status):
    reply = mock_auth.authenticate()
    HTTPretty.register_uri(HTTPretty.POST,
                           IDENTITY_TOKEN_URL,
                           status=status,
                           body=json.dumps(reply))
def _mock_auth(status):
    reply = mock_auth.authenticate()
    HTTPretty.register_uri(HTTPretty.POST, IDENTITY_TOKEN_URL,
                           status=status, body=json.dumps(reply))