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

testapp tests to use djangorestframework to test the package programmatically and visually #2

Open
gsilvapt opened this issue Mar 20, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@gsilvapt
Copy link
Contributor

Related software versions

All

Description

If the testapp has a dummy app, with a test model, exposed via DRF, perhaps we could write some better integration tests by attempting to create a new token from the UI and then calling the API, expecting a 200 response with a controlled body.
This should be a testapp only dependency, just to make it more realistic to work with.

As of now, I could test the Django admin view but that's redundant and insufficient. Writing a test that installs drf, creates an app, exposed a module, bla bla bla seems quite cumbersome.

But I am not sure if this setup is desired or any good, so I'm open to alternatives. Maybe @fopina you have a better idea?

Use cases

As a dev, I want to write tests so that they provide sufficient coverage when merging changes.

References

No response

@gsilvapt gsilvapt added enhancement New feature or request question Further information is requested labels Mar 20, 2023
@fopina
Copy link

fopina commented Mar 22, 2023

Totally agree that testapp should use DRF, this is a package to use with DRF.

DRF is already a dependency btw (via knox - https://github.com/James1345/django-rest-knox/blob/develop/setup.py#L71)

And I see these testapps we use not only as unit test app but also a demo app.
IMO it makes sense adding things that are not required for unit testing but we want to visually/manually verify.

@gsilvapt gsilvapt removed the question Further information is requested label Mar 22, 2023
@gsilvapt gsilvapt changed the title Should testapp use djangorestframework so we can test this? testapp tests to use djangorestframework to test the package programmatically and visually Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants