Example #1
0
 def validate_directory(path):
     if not validate_directory(path):
         return ValidationError(_("'%s is not a valid path.'") % path)
Example #2
0
    def test_validate_directory(self):
        self.failUnless(validate_directory("/home"))
        self.failUnless(validate_directory("~"))

        self.failIf(validate_int("~/SomeFolderNoOneWouldHabe"))
        self.failIf(validate_int("/SomeFolderSystemDoesntHave"))
Example #3
0
    def test_validate_directory(self):
        self.assertTrue(validate_directory("/home"))
        self.assertTrue(validate_directory("~"))

        self.assertFalse(validate_int("~/SomeFolderNoOneWouldHabe"))
        self.assertFalse(validate_int("/SomeFolderSystemDoesntHave"))
Example #4
0
    def test_validate_directory(self):
        self.failUnless(validate_directory("/home"))
        self.failUnless(validate_directory("~"))

        self.failIf(validate_int("~/SomeFolderNoOneWouldHabe"))
        self.failIf(validate_int("/SomeFolderSystemDoesntHave"))
Example #5
0
    def test_validate_directory(self):
        self.assertTrue(validate_directory("/home"))
        self.assertTrue(validate_directory("~"))

        self.assertFalse(validate_int("~/SomeFolderNoOneWouldHabe"))
        self.assertFalse(validate_int("/SomeFolderSystemDoesntHave"))