Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strict reason check for Failure class. #25

Closed
2 tasks done
proofit404 opened this issue May 22, 2018 · 1 comment
Closed
2 tasks done

Strict reason check for Failure class. #25

proofit404 opened this issue May 22, 2018 · 1 comment

Comments

@proofit404
Copy link
Owner

proofit404 commented May 22, 2018

  • Strict check of the reason name in the Failure result class
  • When substory injected or inherited, error protocol should expand to the superset of definitions.
@proofit404
Copy link
Owner Author

proofit404 commented May 23, 2018

story = StoryFactory(failures=('invalid_code', 'invalid_id'))

class AcceptCode:

    @story
    def accept(I):
        I.check_code

    def check_code(self, ctx):
        return Failure('some reason')  # This should fail.

@proofit404 proofit404 changed the title Add optional reason for Failure class and failed_on method. Struct method name and reason check for Failure class. Jun 16, 2018
@proofit404 proofit404 changed the title Struct method name and reason check for Failure class. Strict method name and reason check for Failure class. Jun 16, 2018
@proofit404 proofit404 changed the title Strict method name and reason check for Failure class. Strict reason check for Failure class. Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant