diff options
author | jelle van der Waa <jelle@vdwaa.nl> | 2018-01-22 18:41:39 +0100 |
---|---|---|
committer | Angel Velásquez <angvp@archlinux.org> | 2018-01-22 12:41:39 -0500 |
commit | f42f357fdf20d76bc5468ec227dac66cd0ca3ca8 (patch) | |
tree | 3603d73e12c84cf5513cef7ac8a2041289d34159 /devel | |
parent | c79dc7dcf4a13e381a59a63c57590f2272aa0869 (diff) | |
download | archweb-f42f357fdf20d76bc5468ec227dac66cd0ca3ca8.tar.gz archweb-f42f357fdf20d76bc5468ec227dac66cd0ca3ca8.zip |
Mirror tests (#78)release_2018-01-22
* mirrors: Move tests to mirrors/tests
Move the tests to separate files in mirrors/tests and expand the model
tests with tests for the Mirror class.
* Add CheckLocation test
* mirrors: Add tests for template filters
Include tests for the filters used in the mirrors views.
* devel: Add tests for template filter in_group
Include a test for a simple case of the in_group filter.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/tests/test_templatetags.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/devel/tests/test_templatetags.py b/devel/tests/test_templatetags.py new file mode 100644 index 00000000..3a0f32a2 --- /dev/null +++ b/devel/tests/test_templatetags.py @@ -0,0 +1,12 @@ +from django.contrib.auth.models import User +from django.test import SimpleTestCase + +from devel.templatetags.group import in_group + + +class DevelTemplatetagsTest(SimpleTestCase): + def test_in_group(self): + user = User.objects.create(username="joeuser", first_name="Joe", + last_name="User", email="user1@example.com") + self.assertEqual(in_group(user, 'none'), False) + |