コード例 #1
0
ファイル: endpoint.py プロジェクト: UWIT-IAM/uw-restclients
 def test_endpoint_endpoint_id(self):
     with self.settings(RESTCLIENTS_NWS_DAO_CLASS=
                        'restclients.dao_implementation.nws.File'):
         nws = NWS()
         endpoint = nws.get_endpoint_by_endpoint_id(
             "780f2a49-2118-4969-9bef-bbd38c26970a")
         self._assert_endpoint_matches(endpoint)
コード例 #2
0
ファイル: endpoint.py プロジェクト: uw-it-aca/uw-restclients
    def test_create_endpoint(self):
        with self.settings(
                RESTCLIENTS_NWS_DAO_CLASS='restclients.dao_implementation.nws.File'):
            nws = NWS()
            endpoint = nws.get_endpoint_by_endpoint_id("780f2a49-2118-4969-9bef-bbd38c26970a")
            endpoint.endpoint_id = None
            endpoint.endpoint_uri = None

            self.assertRaises(DataFailureException, nws.create_endpoint, endpoint)
コード例 #3
0
    def test_create_endpoint(self):
        with self.settings(
                RESTCLIENTS_NWS_DAO_CLASS='restclients.dao_implementation.nws.File'):
            nws = NWS()
            endpoint = nws.get_endpoint_by_endpoint_id("780f2a49-2118-4969-9bef-bbd38c26970a")
            endpoint.endpoint_id = None
            endpoint.endpoint_uri = None

            response_status = nws.create_new_endpoint(endpoint)
            self.assertEquals(201, response_status)
コード例 #4
0
ファイル: endpoint.py プロジェクト: UWIT-IAM/uw-restclients
    def test_create_endpoint(self):
        with self.settings(RESTCLIENTS_NWS_DAO_CLASS=
                           'restclients.dao_implementation.nws.File'):
            nws = NWS()
            endpoint = nws.get_endpoint_by_endpoint_id(
                "780f2a49-2118-4969-9bef-bbd38c26970a")
            endpoint.endpoint_id = None
            endpoint.endpoint_uri = None

            response_status = nws.create_new_endpoint(endpoint)
            self.assertEquals(201, response_status)
コード例 #5
0
 def test_endpoint_endpoint_id(self):
     with self.settings(
             RESTCLIENTS_NWS_DAO_CLASS='restclients.dao_implementation.nws.File'):
         nws = NWS()
         endpoint = nws.get_endpoint_by_endpoint_id("780f2a49-2118-4969-9bef-bbd38c26970a")
         self._assert_endpoint_matches(endpoint)