def test_version_mock(self):
        expected_resp = json.dumps(
            {
                u"status_code": 200,
                u"status_message": u"API Version Lookup",
                u"status_time": u"2010-10-22T17:42:59.556Z",
            },
            sort_keys=True,
        )

        mb = MessageBusTemplatesClient(self.api_key)
        mb.__dict__["_MessageBusBase__connection"] = self.__setup_mock_connection__(
            "GET", "/v5/templates/version", "", 200, expected_resp
        )
        received_resp = json.dumps(mb.api_version(), sort_keys=True)
        self._validate_results(expected_resp, received_resp)
        self.mocker.UnsetStubs()
 def test_version(self):
     mb = MessageBusTemplatesClient(self.api_key)
     result = mb.api_version()
     # Templates version is of the form major.minor.path.build
     self.assertEquals(len(result["version"].split(".")), 4)