def setUp(self): from mme_server.server import app from mme_server.cli import add_server self.client = app.test_client() self.data = json.dumps(EXAMPLE_REQUEST) self.auth_token = 'mysecretauthtoken' self.test_server_id = 'test_server_{}'.format(randint(0, 1000000)) add_server(self.test_server_id, 'in', key=self.auth_token) self.accept_header = ('Accept', 'application/vnd.ga4gh.matchmaker.v1.0+json') self.content_type_header = ('Content-Type', 'application/json') self.auth_token_header = ('X-Auth-Token', self.auth_token) self.headers = [ self.accept_header, self.content_type_header, self.auth_token_header, ]
def test_add_server_with_blank_key(self): from mme_server.cli import add_server add_server(self.test_server_id, 'out', key='', base_url='https://example.com/')