Exemple #1
0
    def test_path_does_not_exist(self):
        """Test with a path that does not exist."""
        with self.assertRaises(ValueError) as exc:
            config._validate_path('/does/not/exist')

        self.assertEqual(str(exc.exception),
                         '"/does/not/exist" does not exist.')
Exemple #2
0
    def test_path_exists(self):
        """Test with a path that exists."""
        result = config._validate_path(__file__)

        self.assertEqual(result, __file__)
        self.assertTrue(isinstance(result, six.text_type))