This commit is contained in:
parent
60e8ecc41a
commit
f30076783d
@ -26,7 +26,7 @@ class StdoutWriter(OutputWriter):
|
|||||||
|
|
||||||
|
|
||||||
class KVWriter(OutputWriter):
|
class KVWriter(OutputWriter):
|
||||||
def __init__(self, *args, path=None, **kwargs):
|
def __init__(self, path=None, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
os.stat(path)
|
os.stat(path)
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
@ -42,7 +42,7 @@ class KVWriter(OutputWriter):
|
|||||||
|
|
||||||
|
|
||||||
class HTTPWriter(OutputWriter):
|
class HTTPWriter(OutputWriter):
|
||||||
def __init__(self, *args, path=None, **kwargs):
|
def __init__(self, path=None, *args, **kwargs):
|
||||||
super(HTTPWriter, self).__init__(*args, **kwargs)
|
super(HTTPWriter, self).__init__(*args, **kwargs)
|
||||||
self.path = path
|
self.path = path
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class KeyedWriterFactory:
|
|||||||
logg.debug(f"adding key {k} t keyed writer factory")
|
logg.debug(f"adding key {k} t keyed writer factory")
|
||||||
self.x[k] = v
|
self.x[k] = v
|
||||||
|
|
||||||
def new(self, *_args, path=None, **_kwargs):
|
def new(self, path=None, *_args, **_kwargs):
|
||||||
writer_keyed = None
|
writer_keyed = None
|
||||||
writer_immutable = None
|
writer_immutable = None
|
||||||
if self.key_writer_constructor is not None:
|
if self.key_writer_constructor is not None:
|
||||||
|
@ -4,15 +4,14 @@ import random
|
|||||||
import tempfile
|
import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from cic.contract.components.attachment import Attachment
|
# external imports
|
||||||
from cic.contract.components.proof import Proof
|
from hexathon import add_0x
|
||||||
from cic.contract.processor import ContractProcessor
|
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from cic.writers import KVWriter
|
from cic.writers import KVWriter
|
||||||
|
from cic.contract.components.attachment import Attachment
|
||||||
# external imports
|
from cic.contract.components.proof import Proof
|
||||||
from hexathon import add_0x
|
from cic.contract.processor import ContractProcessor
|
||||||
|
|
||||||
test_base_dir = os.path.dirname(os.path.realpath(__file__))
|
test_base_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
test_data_dir = os.path.join(test_base_dir, "testdata")
|
test_data_dir = os.path.join(test_base_dir, "testdata")
|
||||||
|
@ -14,7 +14,7 @@ from cic.keystore import KeystoreDirectory
|
|||||||
# test imports
|
# test imports
|
||||||
from tests.base_cic import test_base_dir
|
from tests.base_cic import test_base_dir
|
||||||
|
|
||||||
logging = logging.getLogger()
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
script_dir = test_base_dir
|
script_dir = test_base_dir
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user