- Dec 30, 2016
-
-
Jorran de Wit authored
Add valid test for accepted `VetCommentaryForm`. Further added factory for unvetted Commentary.
-
- Dec 23, 2016
-
-
Jorran de Wit authored
These are the templates that had to be within the last commit.
-
Jorran de Wit authored
Emails sent from the vet request commentaries are contains in templates now in the templates folder.
-
Jorran de Wit authored
Logic from vet_commentary_request has been moved to the VetCommentaryForm form. Further moved some code to improve DRY.
-
- Dec 21, 2016
-
-
Jorran de Wit authored
-
Jorran de Wit authored
Method test_form_with_duplicate_*'s second part gave a false-positive result as the form_data contained neither a DOI nor a Arxiv ID. The tests came back positive but actually they were not.
-
Jorran de Wit authored
Add invalid form test for RequestCommentaryForm. Tests contain having no Arxiv ID or DOI or trying to give an already existing identifier.
-
- Dec 19, 2016
-
-
Jorran de Wit authored
Add first form tests using Factory to test RequestCommentaryForm.
-
Jorran de Wit authored
Move few constants to a seperate file away from models. This implies minor edits in other apps relying on these few constants.
-
Jorran de Wit authored
-
https://bitbucket.org/scipostdev/scipost_v1Jorran de Wit authored
Merge branch 'development' of https://bitbucket.org/scipostdev/scipost_v1 into commentaries/wip-jorran
-
- Dec 16, 2016
-
-
Geert Kapteijns authored
-
Geert Kapteijns authored
This function helps to create form data from models. See example given.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
-
Geert Kapteijns authored
Removes some 40 lines of boilerplate, since CreateView handles the creation of a new ThesisLink.
-
- Dec 15, 2016
-
-
Jorran de Wit authored
-
Jorran de Wit authored
This commit contains the first working view test for the `request_commentaries` view.
-
Geert Kapteijns authored
A CreateView class based view should replace the current request_thesislink function based view, since it saves many lines of code and is less error prone and more easily readable.
-
Geert Kapteijns authored
-
https://bitbucket.org/scipostdev/scipost_v1Jorran de Wit authored
Merge branch 'refactor-theses' of https://bitbucket.org/scipostdev/scipost_v1 into commentaries/wip-jorran
-
Jorran de Wit authored
-
Jorran de Wit authored
Move form validation and saving of instances to the form class. From here you are able to instantly save your validated form to the database. Further reduces the size of the views. Form may need error handling on not having found a Contributor before saving the form instance.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
You can now just call ContributorFactory() to get a freshly instantiated Contributor to be used for testing purposes.
-
Geert Kapteijns authored
You can use these UserFactory to create a new user with an associated Contributor. I could not get it to work the other way around.
-
Geert Kapteijns authored
Create fixtures for contributors, groups and permissions.
-
Geert Kapteijns authored
-
Boris Ponsioen authored
-
- Dec 14, 2016
-
-
Geert Kapteijns authored
A blank domain throws an error in /theses/. I've also installed factory_boy (pip install -r requirements.txt to get it) and set up a ThesisLinkFactory and a unit tests that tests whether ThesisLink validates for a blank domain field. Not sure if this is exactly how you're supposed to validate a model, but it's a start. First unit test of the project, whoohoo!
-
Geert Kapteijns authored
This is recommended. Also give names like MASTER_THESIS = 'MA' to avoid magic strings and allow for easy reference, e.g. thesis.type = ThesisLink.MASTER_THESIS. This sort of thing helps in maintainability of the codebase, since if we want to change the abbreviation to 'MASTER' for some reason, we have it defined in one place, and not in 100 places in the code.
-
Geert Kapteijns authored
test_forms.py, test_models.py, test_views.py, as per recommendation of the two scoops book.
-
Geert Kapteijns authored
-
Geert Kapteijns authored
-
Boris Ponsioen authored
-
Boris Ponsioen authored
-
Boris Ponsioen authored
Also slightly pep-improves the models and views.
-
Geert Kapteijns authored
-
Jorran de Wit authored
Lost order argument in query for CommentarySearchForm results in the last commit.
-
Jorran de Wit authored
Reduce the amount of logic in the `commentaries` and `browse` views methods in the `Commentaries` app. Further, added a return method to the `CommentarySearchForm` to help thin out code in the view.
-