https://github.com/ging/horizon
Raw File
Tip revision: 5ce394226a5333285d89cc8163bb4039a0c0e773 authored by Mark McLoughlin on 11 October 2012, 19:35:15 UTC
Bump version to 2012.1.4
Tip revision: 5ce3942
templatetag_tests.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

import re

from django.utils.text import normalize_newlines

from horizon import test


def single_line(text):
    ''' Quick utility to make comparing template output easier. '''
    return re.sub(' +',
                  ' ',
                  normalize_newlines(text).replace('\n', '')).strip()


class TemplateTagTests(test.TestCase):
    pass
back to top