def setUpClass(cls): if not cls.server: plugin = VersionCheckerPlugin(Version("0.16.0"), Version("0.16.0"), ["ImCool"]) cls.server = TestServerLauncher(server_version=Version("0.16.0"), min_client_compatible_version=Version("0.16.0"), plugins=[plugin], users = {"user": "******"}) cls.server.start()
def install_plugins(self): # Check client version self.install( VersionCheckerPlugin(self.server_version, self.min_client_compatible_version)) # Second, check Http Basic Auth self.install(HttpBasicAuthentication()) # Map exceptions to http return codes self.install(ReturnHandlerPlugin(EXCEPTION_CODE_MAPPING)) # Handle jwt auth self.install(JWTAuthentication(self.credentials_manager))
def setUpClass(cls): if not cls.server: plugin = VersionCheckerPlugin(Version("0.16.0"), Version("0.16.0"), ["ImCool"]) cls.server = TestServerLauncher(server_version=Version("0.16.0"), min_client_compatible_version=Version("0.16.0"), plugins=[plugin]) cls.server.start() cls.api = RestApiClient(TestBufferConanOutput(), requester=requests) cls.api.remote_url = "http://127.0.0.1:%s" % str(cls.server.port) # Authenticate user token = cls.api.authenticate("private_user", "private_pass") cls.api.token = token