File diff 0413fed8b957 → fdb62dd1c641
tests/test_meta_receipt.py
Show inline comments
...
 
@@ -44,7 +44,7 @@ class AccountForTesting(typing.NamedTuple):
 
        if self.fallback_meta is None or not include_fallback:
 
            rest = ""
 
        else:
 
            rest = f" or {self.fallback_meta}"
 
            rest = f"/{self.fallback_meta}"
 
        return f"{self.name} missing {TEST_KEY}{rest}"
 

	
 
    def wrong_type_message(self, wrong_value, key=TEST_KEY):
...
 
@@ -206,7 +206,7 @@ def test_invalid_fallback_on_post(hook, test_acct, other_acct, value):
 
))
 
def test_bad_type_fallback_on_post(hook, test_acct, other_acct, value):
 
    expected = {
 
        test_acct.missing_message(False),
 
        test_acct.missing_message(),
 
        test_acct.wrong_type_message(value, test_acct.fallback_meta),
 
    }
 
    check(hook, test_acct, other_acct, expected,
...
 
@@ -237,7 +237,7 @@ def test_invalid_fallback_on_txn(hook, test_acct, other_acct, value):
 
))
 
def test_bad_type_fallback_on_txn(hook, test_acct, other_acct, value):
 
    expected = {
 
        test_acct.missing_message(False),
 
        test_acct.missing_message(),
 
        test_acct.wrong_type_message(value, test_acct.fallback_meta),
 
    }
 
    check(hook, test_acct, other_acct, expected,
...
 
@@ -259,7 +259,7 @@ def test_valid_check_id_on_post(hook, test_acct, other_acct, value):
 
))
 
def test_invalid_check_id_on_post(hook, test_acct, other_acct, value):
 
    expected = {
 
        test_acct.missing_message(False),
 
        test_acct.missing_message(),
 
        f"{test_acct.name} has invalid {test_acct.fallback_meta}: {value}",
 
    }
 
    check(hook, test_acct, other_acct, expected,
...
 
@@ -274,7 +274,7 @@ def test_bad_type_check_id_on_post(hook, test_acct, other_acct, value):
 
    if isinstance(value, decimal.Decimal):
 
        value = ''
 
    expected = {
 
        test_acct.missing_message(False),
 
        test_acct.missing_message(),
 
        test_acct.wrong_type_message(value, test_acct.fallback_meta),
 
    }
 
    check(hook, test_acct, other_acct, expected,
...
 
@@ -296,7 +296,7 @@ def test_valid_check_id_on_txn(hook, test_acct, other_acct, value):
 
))
 
def test_invalid_check_id_on_txn(hook, test_acct, other_acct, value):
 
    expected = {
 
        test_acct.missing_message(False),
 
        test_acct.missing_message(),
 
        f"{test_acct.name} has invalid {test_acct.fallback_meta}: {value}",
 
    }
 
    check(hook, test_acct, other_acct, expected,
...
 
@@ -311,7 +311,7 @@ def test_bad_type_check_id_on_txn(hook, test_acct, other_acct, value):
 
    if isinstance(value, decimal.Decimal):
 
        value = ''
 
    expected = {
 
        test_acct.missing_message(False),
 
        test_acct.missing_message(),
 
        test_acct.wrong_type_message(value, test_acct.fallback_meta),
 
    }
 
    check(hook, test_acct, other_acct, expected,
...
 
@@ -327,7 +327,6 @@ def test_fallback_not_accepted_on_other_accounts(hook, test_acct, other_acct, ke
 
    check(hook, test_acct, other_acct, {test_acct.missing_message()},
 
          post_meta={key: value})
 

	
 

	
 
@pytest.mark.parametrize('test_acct,other_acct,value', testutil.combine_values(
 
    ACCOUNTS_WITH_LINK_FALLBACK,
 
    NOT_REQUIRED_ACCOUNTS,