def test_top_level(self): api = DAS() api.register(BedResource()) api.register(QTLResource()) request = HttpRequest() resp = api.top_level(request) self.assertEqual(resp.status_code, 200) self.assertEqual(resp['X-DAS-Version'], 'DAS/1.6')
def test_register(self): """ Test basic registration of sources with the DAS server """ api = DAS() self.assertEqual(len(api._registry), 0) api.register(BedResource()) self.assertEqual(len(api._registry), 1) api.register(QTLResource()) self.assertEqual(len(api._registry), 2)
def test_top_level(self): api = DAS() api.register(BedResource()) api.register(QTLResource()) request = HttpRequest() resp = api.top_level(request) self.assertEqual(resp.status_code, 200) #print(resp.content) # Testing Response Headers self.assertEqual(resp['X-DAS-Version'], 'DAS/1.6')