'Regression test for #9610.
If the directory name contains a dot and the file name doesn\'t, make
sure we still mangle the file name instead of the directory name.'

def test_directory_with_dot(self):

    self.storage.save(u'dotted.path/test', ContentFile(u'1'))
    self.storage.save(u'dotted.path/test', ContentFile(u'2'))
    files = sorted(os.listdir(os.path.join(self.storage_dir, u'dotted.path')))
    self.assertFalse(os.path.exists(os.path.join(self.storage_dir, u'dotted_.path')))
    self.assertEqual(files[0], u'test')
    six.assertRegex(self, files[1], (u'test_%s' % FILE_SUFFIX_REGEX))
