def test(self): """Testing escapespaces filter""" self.assertEqual(djblets_utils.escapespaces('Hi there'), 'Hi there') self.assertEqual(djblets_utils.escapespaces('Hi there'), 'Hi there') self.assertEqual(djblets_utils.escapespaces('Hi there\n'), 'Hi there<br />')
def test_with_multiple_spaces(self): """Testing {{...|escapespaces}} with multiple consecutive spaces""" self.assertEqual(escapespaces('Hi there'), 'Hi there')
def test_with_newline(self): """Testing {{...|escapespaces}} with newline""" self.assertEqual(escapespaces('Hi there\n'), 'Hi there<br />')
def test_with_single_space(self): """Testing {{...|escapespaces}} with single space""" self.assertEqual(escapespaces('Hi there'), 'Hi there')
def test(self): """Testing escapespaces filter""" self.assertEqual(djblets_utils.escapespaces("Hi there"), "Hi there") self.assertEqual(djblets_utils.escapespaces("Hi there"), "Hi there") self.assertEqual(djblets_utils.escapespaces("Hi there\n"), "Hi there<br />")