From fba76c5434d0fe054f4a672eb41fe51aa7b32237 Mon Sep 17 00:00:00 2001 From: Meek Msaki <98189596+mmsaki@users.noreply.github.com> Date: Mon, 10 Feb 2025 23:46:58 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=8D=20feat:=20refactor=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Vertex_test.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/Vertex_test.py b/tests/Vertex_test.py index ae912c7..58a0d56 100644 --- a/tests/Vertex_test.py +++ b/tests/Vertex_test.py @@ -1,4 +1,5 @@ import unittest + from defigraph.Vertex import Vertex import pytest from web3 import Web3 @@ -26,12 +27,14 @@ def setUp(self): } def test_address_should_be_valid_checksum(self): + name = self.pool["token0"] + decimals = int(self.pool["token0"]["decimals"]) + address = self.pool["token0"]["id"] # should be checksum address with pytest.raises(ValueError): - name = self.pool["token0"] - decimals = int(self.pool["token0"]["decimals"]) - address = self.pool["token0"]["id"] Vertex(name, decimals, address) + Vertex(name, decimals, Web3.to_checksum_address(address)) + def tearDown(self): return super().tearDown()