You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
monero-python/tests/base.py

17 lines
449 B

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())