コード例 #1
0
ファイル: test_locator.py プロジェクト: clach04/pystache
    def test_make_file_name(self):
        locator = Locator()

        locator.template_extension = "bar"
        self.assertEquals(locator.make_file_name("foo"), "foo.bar")

        locator.template_extension = False
        self.assertEquals(locator.make_file_name("foo"), "foo")

        locator.template_extension = ""
        self.assertEquals(locator.make_file_name("foo"), "foo.")
コード例 #2
0
    def test_make_file_name(self):
        locator = Locator()

        locator.template_extension = 'bar'
        self.assertEqual(locator.make_file_name('foo'), 'foo.bar')

        locator.template_extension = False
        self.assertEqual(locator.make_file_name('foo'), 'foo')

        locator.template_extension = ''
        self.assertEqual(locator.make_file_name('foo'), 'foo.')
コード例 #3
0
ファイル: test_locator.py プロジェクト: zhaohc10/airflow2
    def test_make_file_name(self):
        locator = Locator()

        locator.template_extension = 'bar'
        self.assertEqual(locator.make_file_name('foo'), 'foo.bar')

        locator.template_extension = False
        self.assertEqual(locator.make_file_name('foo'), 'foo')

        locator.template_extension = ''
        self.assertEqual(locator.make_file_name('foo'), 'foo.')
コード例 #4
0
ファイル: test_locator.py プロジェクト: clach04/pystache
    def test_make_file_name__template_extension_argument(self):
        locator = Locator()

        self.assertEquals(locator.make_file_name("foo", template_extension="bar"), "foo.bar")
コード例 #5
0
    def test_make_file_name__template_extension_argument(self):
        locator = Locator()

        self.assertEqual(locator.make_file_name('foo', template_extension='bar'), 'foo.bar')
コード例 #6
0
ファイル: test_locator.py プロジェクト: zhaohc10/airflow2
    def test_make_file_name__template_extension_argument(self):
        locator = Locator()

        self.assertEqual(locator.make_file_name('foo', template_extension='bar'), 'foo.bar')