turbogears migration: tests: internationalization

Thomas De Schampheleire patrickdepinguin at gmail.com
Tue May 17 08:34:45 UTC 2016


On Mon, May 16, 2016 at 10:16 PM, Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
> On Mon, May 16, 2016 at 9:30 PM, Thomas De Schampheleire
> <patrickdepinguin at gmail.com> wrote:
> [..]
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsController::()::test_create_with_invalid_reviewer
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsController::()::test_update_with_invalid_reviewer
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsController::()::test_edit_with_invalid_reviewer
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsGetRepoRefs::test_repo_refs_empty_repo
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsGetRepoRefs::test_repo_refs_one_commit_no_hints
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsGetRepoRefs::test_repo_refs_one_commit_rev_hint
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsGetRepoRefs::test_repo_refs_two_commits_branch_hint
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsGetRepoRefs::test_repo_refs_two_commits_no_hints
>> FAIL kallithea/tests/functional/test_pullrequests.py::TestPullrequestsGetRepoRefs::test_repo_refs_two_commits_rev_hints
>>
>>
>> Basically there are two types of failure:
>>
>> - first one where a 400 status code is expected but with some message
>> "Invalid reviewer specified", and the real response is 400 without
>> that message. At first sight it looks unrelated to the translation.
>> Perhaps this is a new difference between pylons and turbogears?
>
> Did some investigation already: the message 'Invalid reviewer
> specified' is given in a flash message. It thus seems that the flash
> messages are not correctly handled in the test execution, or otherwise
> treated differently compared to before. I can try to investigate this
> further...

If I use kallithea.tests.checkSessionFlash (which looks for the flash
session variable) instead of expecting the flash in the body, these
tests succeed. I think it is more correct anyway. Not sure yet why
this is different.

The tests in TestPullrequestsGetRepoRefs still fail, clearly, as the
root cause is different.

/Thomas


More information about the kallithea-general mailing list