summaryrefslogtreecommitdiff
path: root/tests/utils.py
blob: 1936481975d1961d1517f917764125e50565a948 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from django.test import TestCase
from django.core.management import call_command


class CollectStaticTestCase(TestCase):
    def setUp(self):
        call_command('collectstatic', interactive=False)
        super(CollectStaticTestCase, self).setUp()


def clean_css(string):
    # The output of the compiled CSS doesn't have a newline between the ; and
    # the } for some reason.
    return string.strip() \
        .replace('\n', '') \
        .replace('; ', ';')