-
Notifications
You must be signed in to change notification settings - Fork 562
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
Update /tests/core/ #1105
Comments
Hi @OTR Thanks for opening this!
Can you explain in some simple way what you are trying to achieve? It's not clear for me what it is that is supposed to happen above, and you have supplied quite a lengthy set of changes and outputs :) Brief background: The https://django-wiki.readthedocs.io/en/master/development/index.html#get-started is always open for improvements. |
I am trying to run tests from For now, I tried out tests from I ask you if it is possible to clean up I moved some tests from ├── core
│ ├── test_accounts.py
│ ├── test_basic.py
│ ├── test_checks.py
│ ├── test_commands.py
│ ├── test_forms.py
│ ├── test_managers.py
│ ├── test_markdown.py
│ ├── test_models.py
│ ├── test_paginator.py
│ ├── test_sites.py
│ ├── test_template_filters.py
│ ├── test_template_tags.py
│ ├── test_urls.py
│ ├── test_utils.py
│ └── test_views.py
├── custom
│ ├── test_custom_accounts.py
│ ├── test_custom_basic.py
│ ├── test_custom_checks.py
│ └── test_custom_views.py
├── plugins
│ ├── attachments
│ │ └── test_views.py
│ └── macros
│ └── test_toc.py
I just picked names of existed filenames that are look similar by their functionality. I could provide you names of tests that depend on |
Yes, that's absolutely possible - you are more than welcome to contribute to improvements to how tests are organized for a better modular structure 👍 |
I made a branch with my changes. I split the changes into several commits to make it clear what exactly I did step by step. https://github.com/OTR/django-wiki/tree/cleanup-tests-core 1. Move Reason: requires 2. Move Reason: requires 3. Move Reason: requires 4. Move Reason: requires How to prove that it still runs without
|
Found errors1.
with exception
A link to source codedjango-wiki/tests/core/test_views.py Line 554 in f1180fc
> An example of how to reproduce the bug.I added
Pytest outputNarrowing the scope of a problemWhen I comment out this line, the test is passed
2.Three tests from
with exception:
Links to source codedjango-wiki/tests/core/test_template_tags.py Line 273 in f1180fc
django-wiki/tests/core/test_template_tags.py Line 219 in f1180fc
django-wiki/tests/core/test_template_tags.py Line 158 in f1180fc
> An example of how to reproduce the bug.I added
Pytest outputNarrowing the scope of a problemWhen I override that setting by adding the following line in
|
Hi @OTR Your contributions are most welcome, especially you are most welcome to contribute something on the line of what you had worked with in the first post:
If you are able to work out any subsequent issues, that would be great -- but that certainly isn't a requirement. |
The following is more like a feature request.
Unit tests in
/tests/core/test_account.py::SignupViewTests
doesnt match functional tests (actual behaviour of an app).Description of a problem
Actual app (
testproject
) behaves as ifAnonymousUser
given asrequest.user
, but tests coverCustomUser
given asrequest.user
.My suggestion is to write tests for signing up of
auth.models.AnonymousUser
given asrequest.user
because it is how the actual instance of wiki works. Currently tests doesnt cover this view. And put tests withCustomUser
/CustomGroup
/VeryCustomUser
into another directory. Something like down below:And make another sub-directory where placed tests that requires
testadata
app .Also, it would be great if some documentation about
testproject/settings/
and/tests/
provided on readthedocs, in order to easier get involved into contributing.The text was updated successfully, but these errors were encountered: