def runTest(self):
     expected_headers = {
         'Content-Type': 'application/json',
         'bitcodin-api-key': bitcodin.api_key
     }
     headers = bitcodin.create_headers()
     self.assertDictEqual(expected_headers, headers)
示例#2
0
 def runTest(self):
     response = RestClient.get(url=bitcodin.get_api_base()+'/statistics/2000-12-24/2100-12-24', headers=bitcodin.create_headers())
 def runTest(self):
     with self.assertRaises(BitcodinNotFoundError):
         response = RestClient.get(url=bitcodin.get_api_base(), headers=bitcodin.create_headers())
 def runTest(self):
     with self.assertRaises(BitcodinUnknownApiRequestUrlError):
         response = RestClient.get(url=bitcodin.get_api_base(), headers=bitcodin.create_headers())
示例#5
0
 def runTest(self):
     with self.assertRaises(BitcodinApiKeyNotAuthorizedError):
         response = RestClient.get(url=bitcodin.get_api_base(),
                                   headers=bitcodin.create_headers())
    def test_create_headers(self):
        headers = {"Content-Type": "application/json", "bitcodin-api-key": bitcodin.api_key}
        header_created = bitcodin.create_headers()

        self.assertDictEqual(headers, header_created)