示例#1
0
 def test_integer_with_special_characters(self):
     self.assertEqual(False, validators.integer('!"#¤%&/()=?*"^'))
示例#2
0
 def test_integer_with_string(self):
     self.assertEqual(False, validators.integer('astring'))
示例#3
0
 def test_integer_with_number(self):
     self.assertEqual('12345', validators.integer('12345'))
示例#4
0
 def test_integer_with_float(self):
     self.assertEqual(False, validators.integer('123.5'))
示例#5
0
文件: config.py 项目: sprvn/lupify
def validate_mongodb_port(mongodb_port):
    return validators.integer(mongodb_port)