File tree Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Expand file tree Collapse file tree 2 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ import os
3+ import io
4+ import unittest
5+ from src .lighthouseweb3 import Lighthouse
6+ from src .lighthouseweb3 .functions .utils import NamedBufferedReader
7+ from .setup import parse_env
8+
9+
10+ class TestDealStatus (unittest .TestCase ):
11+
12+ def test_deal_status (self ):
13+ """test static test_deal_status function"""
14+ res = Lighthouse .getDealStatus (
15+ "QmT9shXpKcn4HRbJhXJ1ZywzwjEo2QWbxAx4SVgW4eYKjG" )
16+ self .assertIsInstance (res , list , "data is a list" )
17+ self .assertNotEqual (res [0 ].get (
18+ "dealId" ), int , "dealId is Int" )
19+
20+ def test_deal_status_init (self ):
21+ """test deal_status function"""
22+ parse_env ()
23+ l = Lighthouse (os .environ .get ("LIGHTHOUSE_TOKEN" ))
24+ res = l .getDealStatus (
25+ "QmT9shXpKcn4HRbJhXJ1ZywzwjEo2QWbxAx4SVgW4eYKjG" )
26+ self .assertIsInstance (res , list , "data is a list" )
27+ self .assertNotEqual (res [0 ].get (
28+ "dealId" ), int , "dealId is Int" )
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ import os
3+ import io
4+ import unittest
5+ from src .lighthouseweb3 import Lighthouse
6+ from src .lighthouseweb3 .functions .utils import NamedBufferedReader
7+ from .setup import parse_env
8+
9+
10+ class TestDealStatus (unittest .TestCase ):
11+
12+ def test_get_upload (self ):
13+ """test static test_get_upload function"""
14+ res = Lighthouse .getUploads (
15+ "0xB23809427cFc9B3346AEC5Bb70E7e574696cAF80" )
16+ self .assertIsInstance (res .get ("fileList" ), list , "data is a list" )
17+
18+ def test_get_upload_init (self ):
19+ """test get_upload function"""
20+ parse_env ()
21+ l = Lighthouse (os .environ .get ("LIGHTHOUSE_TOKEN" ))
22+ res = Lighthouse .getUploads (
23+ "0xB23809427cFc9B3346AEC5Bb70E7e574696cAF80" )
24+ self .assertIsInstance (res .get ("fileList" ), list , "data is a list" )
You can’t perform that action at this time.
0 commit comments