fix: tests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
William Luke 2022-04-26 14:39:49 +03:00
parent 60e8ecc41a
commit f30076783d
3 changed files with 9 additions and 10 deletions

View File

@ -26,7 +26,7 @@ class StdoutWriter(OutputWriter):
class KVWriter(OutputWriter):
def __init__(self, *args, path=None, **kwargs):
def __init__(self, path=None, *args, **kwargs):
try:
os.stat(path)
except FileNotFoundError:
@ -42,7 +42,7 @@ class KVWriter(OutputWriter):
class HTTPWriter(OutputWriter):
def __init__(self, *args, path=None, **kwargs):
def __init__(self, path=None, *args, **kwargs):
super(HTTPWriter, self).__init__(*args, **kwargs)
self.path = path
@ -83,7 +83,7 @@ class KeyedWriterFactory:
logg.debug(f"adding key {k} t keyed writer factory")
self.x[k] = v
def new(self, *_args, path=None, **_kwargs):
def new(self, path=None, *_args, **_kwargs):
writer_keyed = None
writer_immutable = None
if self.key_writer_constructor is not None:

View File

@ -4,15 +4,14 @@ import random
import tempfile
import unittest
from cic.contract.components.attachment import Attachment
from cic.contract.components.proof import Proof
from cic.contract.processor import ContractProcessor
# external imports
from hexathon import add_0x
# local imports
from cic.writers import KVWriter
# external imports
from hexathon import add_0x
from cic.contract.components.attachment import Attachment
from cic.contract.components.proof import Proof
from cic.contract.processor import ContractProcessor
test_base_dir = os.path.dirname(os.path.realpath(__file__))
test_data_dir = os.path.join(test_base_dir, "testdata")

View File

@ -14,7 +14,7 @@ from cic.keystore import KeystoreDirectory
# test imports
from tests.base_cic import test_base_dir
logging = logging.getLogger()
log = logging.getLogger(__name__)
script_dir = test_base_dir