Available tests¶
Forms¶
Ensure that
thecut.authorship.forms.AuthorshipMixin-based forms cannot be instantiated without passing in a user.
Ensure that
thecut.authorship.forms.AuthorshipMixin-based forms properly setthecut.authorship.forms.AuthorshipMixin.userwhen one is passed on instantiation.
Ensure that
thecut.authorship.forms.AuthorshipMixin.save()calls the superclass’s save method..
Ensure that
thecut.authorship.forms.AuthorshipMixin-based forms do not setthecut.authorship.models.AuthorshipMixin.created_byif the target object has already been saved.
Ensure that
thecut.authorship.forms.AuthorshipMixin-based forms appropriately setthecut.authorship.models.AuthorshipMixin.created_bywhen a user is provided and the target object has not been saved before.
Ensure that
thecut.authorship.forms.AuthorshipMixin-based forms appropriately setthecut.authorship.models.AuthorshipMixin.updated_bywhen a user is provided.
Models¶
Ensure that
thecut.authorship.models.Authorship.created_byis not updated for existing models.
Check if
created_byis correctly set on first save.
Ensure that
thecut.authorship.models.Authorship.updated_atis updated, even whenupdate_fieldsis specified.
Ensure that
thecut.authorship.models.Authorship.updated_byis updated, even whenupdate_fieldsis specified.
Ensure that
thecut.authorship.models.Authorship.updated_byis updated on save.
Utils¶
Tests for get_website_user().
Test if the same user is returned over multiple calls.
Test if something is returned.