Example #1
0
    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.")
    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.')
Example #3
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.')
Example #4
0
    def test_make_file_name__template_extension_argument(self):
        locator = Locator()

        self.assertEquals(locator.make_file_name("foo", template_extension="bar"), "foo.bar")
    def test_make_file_name__template_extension_argument(self):
        locator = Locator()

        self.assertEqual(locator.make_file_name('foo', template_extension='bar'), 'foo.bar')
Example #6
0
    def test_make_file_name__template_extension_argument(self):
        locator = Locator()

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