Example #1
0
    def test_dot_under(self):
        """All dots and underscores should be removed from the name"""

        self.assertEqual(names.clean_name('How.I.Met.Your.Mother'),
            'How I Met Your Mother')
        self.assertEqual(names.clean_name('How_I_Met_Your_Mother'),
            'How I Met Your Mother')
        self.assertEqual(names.clean_name('How.I.Met.Your.Mother_'),
            'How I Met Your Mother')
        self.assertEqual(names.clean_name('How.I.Met.Your.Mother.'),
            'How I Met Your Mother')
        self.assertEqual(names.clean_name('_How.I.Met.Your.Mother'),
            'How I Met Your Mother')
        self.assertEqual(names.clean_name('.How.I.Met.Your.Mother_'),
            'How I Met Your Mother')
        self.assertEqual(names.clean_name('How_I.Met_Your.Mother'),
            'How I Met Your Mother')
Example #2
0
 def test_decimal_numbers(self):
     """Dots in decimal numbers should not be removed"""
     self.assertEqual(names.clean_name('foo.bar.1.2'), 'foo bar 1.2')
     self.assertEqual(names.clean_name('foo_bar_1.2'), 'foo bar 1.2')