def test_get_tag_html_kwargs_works_with_floats(self):
        tag_id = str(uuid.uuid4())
        set_lazy_tag_data(tag_id, 'lib.tag_name', None, {'test': 1.23})

        html = get_tag_html(tag_id)

        self.assertEqual(html, "{% load lib %}{% tag_name test=1.23 %}")
    def test_get_tag_html_args_works_with_ints(self):
        tag_id = str(uuid.uuid4())
        set_lazy_tag_data(tag_id, 'lib.tag_name', [1.23, 4.56])

        html = get_tag_html(tag_id)

        self.assertEqual(html, "{% load lib %}{% tag_name 1.23 4.56 %}")
    def test_get_tag_html_args_works_with_strings(self):
        tag_id = str(uuid.uuid4())
        set_lazy_tag_data(tag_id, 'lib.tag_name', ['hello', 'world'])

        html = get_tag_html(tag_id)

        self.assertEqual(html, "{% load lib %}{% tag_name 'hello' 'world' %}")
Beispiel #4
0
    def test_get_tag_html_kwargs_works_with_ints(self):
        html = get_tag_html('lib.tag_name', args=None, kwargs='{"test": 123}')

        self.assertEqual(html, "{% load lib %}{% tag_name test=123 %}")
Beispiel #5
0
    def test_get_tag_html_kwargs_works_with_strings(self):
        html = get_tag_html('lib.tag_name',
                            args=None,
                            kwargs='{"test": "hello"}')

        self.assertEqual(html, "{% load lib %}{% tag_name test='hello' %}")
Beispiel #6
0
    def test_get_tag_html_args_works_with_ints(self):
        html = get_tag_html('lib.tag_name', args='[1.23, 4.56]')

        self.assertEqual(html, "{% load lib %}{% tag_name 1.23 4.56 %}")
Beispiel #7
0
    def test_get_tag_html_args_works_with_strings(self):
        html = get_tag_html('lib.tag_name', args='["hello", "world"]')

        self.assertEqual(html, "{% load lib %}{% tag_name 'hello' 'world' %}")
Beispiel #8
0
    def test_get_tag_html_kwargs_works_with_strings(self):
        html = get_tag_html('lib.tag_name', args=None,
                            kwargs='{"test": "hello"}')

        self.assertEqual(html, "{% load lib %}{% tag_name test='hello' %}")
Beispiel #9
0
    def test_get_tag_html_args_works_with_ints(self):
        html = get_tag_html('lib.tag_name', args='[1.23, 4.56]')

        self.assertEqual(html, "{% load lib %}{% tag_name 1.23 4.56 %}")
Beispiel #10
0
    def test_get_tag_html_args_works_with_strings(self):
        html = get_tag_html('lib.tag_name', args='["hello", "world"]')

        self.assertEqual(html, "{% load lib %}{% tag_name 'hello' 'world' %}")
Beispiel #11
0
    def test_get_tag_html_kwargs_works_with_floats(self):
        html = get_tag_html('lib.tag_name', args=None, kwargs='{"test": 1.23}')

        self.assertEqual(html, "{% load lib %}{% tag_name test=1.23 %}")