'create SoftChroot on file, not a directory'

@mock.patch('headphones.softchroot.os', wrap=os, name='OsMock')
def test_create_on_file(self, os_mock):

    path = os.path.join('/tmp', 'notexist', 'asdf', '11', '12', 'np', 'itsssss')
    os_mock.path.sep = os.path.sep
    os_mock.path.isdir.side_effect = (lambda x: (x != path))
    cf = None
    with self.assertRaises(SoftChrootError) as exc:
        cf = SoftChroot(path)
    self.assertIsNone(cf)
    self.assertTrue(os_mock.path.isdir.called)
    self.assertRegexpMatches(str(exc.exception), 'No    such    directory')
    self.assertRegexpMatches(str(exc.exception), path)
