コード例 #1
0
 def test_get_unknown_authentication_method(self, m):
     sde_client = SDEClient("http://localhost/sde", "Unknown", None, None,
                            None, None)
     m.register_uri('GET',
                    SDEClient.GET_TASK_URI % (sde_client.url, '1', '1-T2'),
                    json=json.loads(GET_TASK_RESPONSE))
     sde_client.get_task('1', 'FAILED')
コード例 #2
0
 def test_get_unknown_task(self, m):
     sde_client = SDEClient("http://localhost/sde", "Basic", None, "admin",
                            "admin", None)
     m.register_uri('GET',
                    SDEClient.GET_TASK_URI %
                    (sde_client.url, '1', 'FAILED'),
                    status_Code=403)
     sde_client.get_task('1', 'FAILED')
コード例 #3
0
 def test_get_task_token_auth(self, m):
     sde_client = SDEClient("http://localhost/sde", "PAT", None, None, None,
                            "1234abcd")
     m.register_uri('GET',
                    SDEClient.GET_TASK_URI % (sde_client.url, '1', '1-T2'),
                    json=json.loads(GET_TASK_RESPONSE))
     eq_(json.loads(GET_TASK_RESPONSE), sde_client.get_task('1', '1-T2'))
コード例 #4
0
 def test_get_task_basic_auth(self, m):
     sde_client = SDEClient("http://localhost/sde", "Basic", None, "admin",
                            "admin", None)
     m.register_uri('GET',
                    SDEClient.GET_TASK_URI % (sde_client.url, '1', '1-T2'),
                    json=json.loads(GET_TASK_RESPONSE))
     eq_(json.loads(GET_TASK_RESPONSE), sde_client.get_task('1', '1-T2'))