Allow optional arguments in controllers#1366
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1366 +/- ##
==========================================
+ Coverage 83.02% 83.03% +<.01%
==========================================
Files 72 72
Lines 10457 10333 -124
==========================================
- Hits 8682 8580 -102
+ Misses 1775 1753 -22
Continue to review full report at Codecov.
|
| @@ -0,0 +1,107 @@ | |||
| import pytest | |||
There was a problem hiding this comment.
Are these new intentionally test modules (added the letter b)?
There was a problem hiding this comment.
Somehow pytest isn't happy when they have the same filename, albeit in different directories. Thus, _b / _f
There was a problem hiding this comment.
Can we combine them into a single test - or does this need to be a stand alone module?
|
|
||
|
|
||
| @pytest.fixture(scope="module") | ||
| def capsule_side_channel_blockchain(enacted_blockchain_policy): |
There was a problem hiding this comment.
Interesting - What Incompatibility did you encounter with the Federated Side Channel?
There was a problem hiding this comment.
I think, they have different labels, so it pretty much appears to be the wrong capsule (and yielding a decryption error). It's not incompatibility per se, I think fixtures can be worked on. I just didn't focus on that in this PR - wanted them minimally working.
| raise cls.SpecificationError(f"{cls.__class__.__name__} has no such control interface: '{interface_name}'") | ||
|
|
||
| return input_specification, output_specification | ||
| return spec.get('in', tuple()),\ |
There was a problem hiding this comment.
This bit reads a little awkward on the return line, especially.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Why? Because all in should be present in the spec?
| __create_policy = (('bob_encrypting_key', 'bob_verifying_key', 'm', 'n', 'label', 'expiration'), # In | ||
| ('label', 'policy_encrypting_key')) # Out | ||
| __create_policy = {'in': ('bob_encrypting_key', 'bob_verifying_key', 'm', 'n', 'label', 'expiration'), | ||
| 'optional': ('value', 'first_period_reward', 'rate'), |
|
|
||
| def reset(self): | ||
| self.messages = [] | ||
| self() |
There was a problem hiding this comment.
Ah?
I think, I just copied it :-) Could be done better, yes
KPrasch
left a comment
There was a problem hiding this comment.
Looking Good - Just a few few questions regarding test modules and resolving specifications.
| raise cls.SpecificationError(f"{cls.__class__.__name__} has no such control interface: '{interface_name}'") | ||
|
|
||
| return input_specification, output_specification | ||
| return spec.get('in', tuple()),\ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Well - I personally do prefer to have named objects before returning them for debugging ease and readability. :-) |
|
@KPrasch ok, will return dict perhaps. I understand how that is better |
|
Ok, as per conversation, will do |
eddec6c to
d0c889a
Compare
Uh oh!
There was an error while loading. Please reload this page.