~roadmr/canonical-identity-provider/fix-deprecation-warnings-1

« back to all changes in this revision

Viewing changes to src/identityprovider/tests/test_auth.py

  • Committer: Maximiliano Bertacchini
  • Date: 2018-02-09 14:17:25 UTC
  • mto: This revision was merged to the branch mainline in revision 1600.
  • Revision ID: maximiliano.bertacchini@canonical.com-20180209141725-i2v7ady5gm9cy9p9
Upgrade flake8 to 3.5.0 and fix code style accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
599
599
        self.assertEqual(result, self.token.secret)
600
600
 
601
601
    def test_get_access_token_secret_with_filter_matches_v2_token(self):
602
 
        token_filter = lambda token: 'test' not in token.name  # matches both
 
602
        def token_filter(token):
 
603
            return 'test' not in token.name  # matches both
603
604
        validator = SSORequestValidator(token_filter)
604
605
 
605
606
        result = validator.get_access_token_secret(
615
616
        self.assertEqual(result, self.validator.dummy_access_token)
616
617
 
617
618
    def test_get_access_token_secret_with_filter_matches_v1_token(self):
618
 
        token_filter = lambda token: token.name != 'test'
 
619
        def token_filter(token):
 
620
            return token.name != 'test'
619
621
        validator = SSORequestValidator(token_filter)
620
622
 
621
623
        result = validator.get_access_token_secret(