mirror of
https://git.wownero.com/lza_menace/wownero-python.git
synced 2024-08-15 03:25:25 +00:00
16 lines
448 B
Python
16 lines
448 B
Python
|
import json
|
||
|
import os
|
||
|
import unittest
|
||
|
|
||
|
class JSONTestCase(unittest.TestCase):
|
||
|
jsonrpc_url = 'http://127.0.0.1:18088/json_rpc'
|
||
|
data_subdir = None
|
||
|
|
||
|
def _read(self, *args):
|
||
|
path = os.path.join(os.path.dirname(__file__), 'data')
|
||
|
if self.data_subdir:
|
||
|
path = os.path.join(path, self.data_subdir)
|
||
|
path = os.path.join(path, *args)
|
||
|
with open(path, 'r') as fh:
|
||
|
return json.loads(fh.read())
|