def setUp(self):
     self.creds = credentials.Credentials(dragonchain_id="TestID", auth_key="TestKey", auth_key_id="TestKeyId")
     self.request = request.Request(self.creds, endpoint="https://dummy.test")
 def setUp(self):
     self.creds = credentials.Credentials(dragonchain_id="TestID", auth_key="TestKey", auth_key_id="TestKeyId")
 def test_get_correct_hash_algorithm_sha3_256(self):
     test_credentials = credentials.Credentials(dragonchain_id="test", auth_key="test", auth_key_id="test", algorithm="SHA3-256")
     self.assertEqual(test_credentials.algorithm, "SHA3-256")
     self.assertEqual(test_credentials.hash_method, hashlib.sha3_256)
 def test_get_correct_hash_algorithm_blake2b(self):
     test_credentials = credentials.Credentials(dragonchain_id="test", auth_key="test", auth_key_id="test", algorithm="BLAKE2b512")
     self.assertEqual(test_credentials.algorithm, "BLAKE2b512")
     self.assertEqual(test_credentials.hash_method, hashlib.blake2b)
 def test_credentials_calls_get_get_credentials_when_not_provided(self, mock_get_creds):
     credentials.Credentials(dragonchain_id="test")
     mock_get_creds.assert_called_once_with("test")
 def test_credentials_calls_get_dragonchain_id_when_not_provided(self, mock_get_id):
     credentials.Credentials(auth_key="test", auth_key_id="test")
     mock_get_id.assert_called_once()