Exemple #1
0
    def test_main(self):
        result = chevron.main('tests/test.mustache', 'tests/data.json',
                              partials_path='tests')

        with open('tests/test.rendered', 'r') as f:
            expected = f.read()

        self.assertEqual(result, expected)
Exemple #2
0
    def test_main(self):
        result = chevron.main('tests/test.mustache', 'tests/data.json',
                              partials_path='tests')

        with open('tests/test.rendered', 'r') as f:
            expected = f.read()

        self.assertEqual(result, expected)
Exemple #3
0
    def test_main(self):
        result = chevron.main('tests/test.mustache', 'tests/data.json',
                              partials_path='tests')

        with io.open('tests/test.rendered', 'r', encoding='utf-8') as f:
            expected = f.read()
            if not python3:
                expected = expected.encode('utf-8')

        self.assertEqual(result, expected)
Exemple #4
0
    def test_main(self):
        result = chevron.main('tests/test.mustache', 'tests/data.json',
                              partials_path='tests')

        with io.open('tests/test.rendered', 'r', encoding='utf-8') as f:
            expected = f.read()
            if not python3:
                expected = expected.encode('utf-8')

        self.assertEqual(result, expected)