test_website.py 710 Bytes
Newer Older
1
"""Tests for things provided by this module"""
2
3
import doctest

4
from django.test import TestCase
Thom Wiggers's avatar
Thom Wiggers committed
5

6
from thaliawebsite import sitemaps
7
from thaliawebsite.templatetags import bleach_tags
8
9


10
def load_tests(_loader, tests, _ignore):
11
12
13
14
15
    """
    Load all tests in this module
    """
    # Adds the doctests in bleach_tags
    tests.addTests(doctest.DocTestSuite(bleach_tags))
16
    tests.addTests(doctest.DocTestSuite(sitemaps))
17
18
    return tests

Thom Wiggers's avatar
Thom Wiggers committed
19

20
class SitemapTest(TestCase):
21
22
23
24
    fixtures = [
        'members.json', 'member_groups.json',
        'merchandiseitems.json',
    ]
25
26
27
28

    def test_sitemap_success(self):
        response = self.client.get('/sitemap.xml')
        self.assertEqual(response.status_code, 200)