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

Codeforces changed the HTML around login #140

Open
kmyk opened this issue Apr 5, 2021 · 0 comments
Open

Codeforces changed the HTML around login #140

kmyk opened this issue Apr 5, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@kmyk
Copy link
Member

kmyk commented Apr 5, 2021

Summary / 概要

tests.login_service.LoginServiceCodeforcesTest testMethod=test_login_failure failed.

Steps to reproduce / 再現方法

  1. pytest tests/*.py

Expected behavior / 期待される挙動

The tests pass.

Actual behavior / 実際の挙動

https://github.com/online-judge-tools/api-client/runs/2272180619

=================================== FAILURES ===================================
________________ LoginServiceCodeforcesTest.test_login_failure _________________

self = <tests.login_service.LoginServiceCodeforcesTest testMethod=test_login_failure>

    def test_login_failure(self) -> None:
        url = 'https://codeforces.com/'
        expected = {'status': 'error', 'messages': ['onlinejudge.type.LoginError: Invalid handle or password.'], 'result': None}
    
        with update_environ(USERNAME='online-judge-tools', PASSWORD='password'):
            with temporary_cookie() as cookie_path:
                actual = main(['--cookie', str(cookie_path), 'login-service', url], debug=True)
>       self.assertEqual(expected, actual)
E       AssertionError: {'sta[24 chars]': ['onlinejudge.type.LoginError: Invalid hand[29 chars]None} != {'sta[24 chars]': ['AssertionError'], 'result': None}
E       + {'messages': ['AssertionError'], 'result': None, 'status': 'error'}
E       - {'messages': ['onlinejudge.type.LoginError: Invalid handle or password.'],
E       -  'result': None,
E       -  'status': 'error'}

tests/login_service.py:80: AssertionError
@kmyk kmyk added the bug Something isn't working label Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant