@@ -45,61 +45,48 @@ def test_unsigned_item():
45
45
exc_info .match (r'No signature attribute found in item' )
46
46
47
47
48
- def test_ephemeral_item_cycle (some_cmps , parametrized_actions , parametrized_item ):
49
- """Test a small number of curated CMPs against a small number of curated items."""
48
+ def _item_cycle_check (materials_provider , attribute_actions , item ):
50
49
crypto_config = CryptoConfig (
51
- materials_provider = some_cmps ,
50
+ materials_provider = materials_provider ,
52
51
encryption_context = EncryptionContext (),
53
- attribute_actions = parametrized_actions
52
+ attribute_actions = attribute_actions
54
53
)
55
- cycle_item_check (parametrized_item , crypto_config )
54
+ cycle_item_check (item , crypto_config )
55
+
56
+
57
+ def test_ephemeral_item_cycle (some_cmps , parametrized_actions , parametrized_item ):
58
+ """Test a small number of curated CMPs against a small number of curated items."""
59
+ _item_cycle_check (some_cmps , parametrized_actions , parametrized_item )
56
60
57
61
58
62
@pytest .mark .slow
59
63
def test_ephemeral_item_cycle_slow (all_the_cmps , parametrized_actions , parametrized_item ):
60
64
"""Test ALL THE CMPS against a small number of curated items."""
61
- crypto_config = CryptoConfig (
62
- materials_provider = all_the_cmps ,
63
- encryption_context = EncryptionContext (),
64
- attribute_actions = parametrized_actions
65
- )
66
- cycle_item_check (parametrized_item , crypto_config )
65
+ _item_cycle_check (all_the_cmps , parametrized_actions , parametrized_item )
67
66
68
67
69
68
@pytest .mark .slow
69
+ @pytest .mark .hypothesis
70
70
@SLOW_SETTINGS
71
71
@hypothesis .given (item = ddb_items )
72
72
def test_ephemeral_item_cycle_hypothesis_slow (some_cmps , parametrized_actions , item ):
73
73
"""Test a small number of curated CMPs against a large number of items."""
74
- crypto_config = CryptoConfig (
75
- materials_provider = some_cmps ,
76
- encryption_context = EncryptionContext (),
77
- attribute_actions = parametrized_actions
78
- )
79
- cycle_item_check (item , crypto_config )
74
+ _item_cycle_check (some_cmps , parametrized_actions , item )
80
75
81
76
82
77
@pytest .mark .veryslow
78
+ @pytest .mark .hypothesis
83
79
@VERY_SLOW_SETTINGS
84
80
@hypothesis .given (item = ddb_items )
85
81
def test_ephemeral_item_cycle_hypothesis_veryslow (some_cmps , parametrized_actions , item ):
86
82
"""Test a small number of curated CMPs against ALL THE ITEMS."""
87
- crypto_config = CryptoConfig (
88
- materials_provider = some_cmps ,
89
- encryption_context = EncryptionContext (),
90
- attribute_actions = parametrized_actions
91
- )
92
- cycle_item_check (item , crypto_config )
83
+ _item_cycle_check (some_cmps , parametrized_actions , item )
93
84
94
85
95
86
@pytest .mark .nope
87
+ @pytest .mark .hypothesis
96
88
@VERY_SLOW_SETTINGS
97
89
@hypothesis .given (item = ddb_items )
98
90
def test_ephemeral_item_cycle_hypothesis_nope (all_the_cmps , parametrized_actions , item ):
99
91
"""Test ALL THE CMPs against ALL THE ITEMS."""
100
- crypto_config = CryptoConfig (
101
- materials_provider = all_the_cmps ,
102
- encryption_context = EncryptionContext (),
103
- attribute_actions = parametrized_actions
104
- )
105
- cycle_item_check (item , crypto_config )
92
+ _item_cycle_check (all_the_cmps , parametrized_actions , item )
0 commit comments