Skip to content

raratiru/django-testing-on-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

After creating a virtual env and installing the requirements.txt packages:

(virtualenv)$ pytest

The tests located in user/test_user.py will save a UserChangeForm with 'is_superuser' = True and test if the superuser is added to the group Superuser.

The above is achieved by catching a post_save signal of the User model in user.signals.py.

The tests provided show that the necessary conditions for a successfull result are:

Without either of those, the user will not be added to any groups.

About

A repo that tests the use of on_commit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages