anitab-org / anitab-org/anitab-forms-backend

tests: Add test for views of token_auth

Offen
#63 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Category: Quality Assurance Hacktoberfest Status: Available Type: Testing
Vorherrschende Sprache
Python
Sterne
17
Forks
60
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Is your feature request related to a problem? Please describe.
Add test code for the views in token_auth to test all the views in the token_auth app.

### Describe the solution you'd like
- [ ] Create new files with the name `test_view_register.py` and `test_view_tokens.py` inside `tests\`.
- [ ] In `test_view_register.py` add tests for RegisterView.
- [ ] In `test_view_tokens.py` add tests for TokenObtainPairView, TokenRefreshView, TokenGenerator (For details see `urls.py`).
__NOTE__: Use Django defaults unit tests.

### Definition of Done
- [ ] All of the required items are completed.
- [x] Approval by 1 mentor.

### Additional context
* See this for writing tests [resource 1](https://www.django-rest-framework.org/api-guide/testing/) and [resource 2](https://docs.djangoproject.com/en/3.1/topics/testing/tools/)

### Estimation
4 hours

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.