removes close relation between taa and input validation
@@ -6,13 +6,8 @@ from plenum.common.util import get_utc_epoch
from plenum.common.messages.fields import TimestampField
from plenum.common.types import f
-# TODO external fixtures imports
-from plenum.test.txn_author_agreement.conftest import (
- random_taa, get_txn_author_agreement, aml_request_kwargs
-)
-from plenum.test.txn_author_agreement.acceptance.conftest import (
- taa_acceptance, taa_digest, taa_acceptance_mechanism, taa_acceptance_time
-)
+from plenum.test.txn_author_agreement.helper import calc_taa_digest
+
from .helper import gen_nym_operation
@@ -27,6 +22,15 @@ def operation_invalid(operation):
return operation
+@pytest.fixture
+def taa_acceptance():
+ return {
+ f.TAA_ACCEPTANCE_DIGEST.nm: calc_taa_digest('some-taa-text', 'some-taa-version'),
+ f.TAA_ACCEPTANCE_MECHANISM.nm: 'some-taa-acceptance-mechanism',
+ f.TAA_ACCEPTANCE_TIME.nm: get_utc_epoch()
+ }
+
+
@pytest.fixture
def taa_acceptance_invalid(taa_acceptance):
taa_acceptance[f.TAA_ACCEPTANCE_TIME.nm] = TimestampField._oldest_time - 1
