def test_valid(self):
     for op in ops:
         raw_data = load_horizon_file(f"operations/{op['filename']}")
         parsed_data = OperationResponse.parse_obj(raw_data)
         self.assertTrue(isinstance(parsed_data, OperationResponse))
         self.assertTrue(isinstance(parsed_data.record, op["class"]))
         self.assertEqual(raw_data["id"], parsed_data.record.id)
 def test_valid(self):
     raw_data = load_horizon_file("fee_stats.json")
     parsed_data = FeeStatsResponse.parse_obj(raw_data)
     self.assertTrue(isinstance(parsed_data, FeeStatsResponse))
     self.assertTrue(isinstance(parsed_data, FeeStats))
Exemplo n.º 3
0
 def test_valid(self):
     raw_data = load_horizon_file("liquidity_pool_alphanum.json")
     parsed_data = LiquidityPoolResponse.parse_obj(raw_data)
     self.assertTrue(isinstance(parsed_data, LiquidityPoolResponse))
     self.assertTrue(isinstance(parsed_data, LiquidityPool))
Exemplo n.º 4
0
 def test_valid(self):
     raw_data = load_horizon_file("claimable_balance_conditional.json")
     parsed_data = ClaimableBalanceResponse.parse_obj(raw_data)
     self.assertTrue(isinstance(parsed_data, ClaimableBalanceResponse))
     self.assertTrue(isinstance(parsed_data, ClaimableBalance))
 def test_valid(self):
     raw_data = load_horizon_file("account.json")
     parsed_data = AccountResponse.parse_obj(raw_data)
     self.assertTrue(isinstance(parsed_data, AccountResponse))
     self.assertTrue(isinstance(parsed_data, Account))
 def test_valid(self):
     raw_data = load_horizon_file("transaction.json")
     parsed_data = TransactionResponse.parse_obj(raw_data)
     self.assertTrue(isinstance(parsed_data, TransactionResponse))
     self.assertTrue(isinstance(parsed_data, Transaction))
Exemplo n.º 7
0
 def test_valid(self):
     raw_data = load_horizon_file("ledger.json")
     parsed_data = LedgerResponse.parse_obj(raw_data)
     self.assertTrue(isinstance(parsed_data, LedgerResponse))
     self.assertTrue(isinstance(parsed_data, Ledger))