コード例 #1
0
ファイル: test_spec.py プロジェクト: vascoosx/chevron
    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)
コード例 #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)
コード例 #3
0
ファイル: test_spec.py プロジェクト: tekknolagi/chevron
    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)
コード例 #4
0
ファイル: test_spec.py プロジェクト: dmorrison42/chevron
    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)