Пример #1
0
 def test_min_length_error(self):
     min_length = randint(0, 100)
     validate_dict = {'dummy': {'min': min_length}}
     dummy_data = {'dummy': randStr(N=min_length - 1)}
     with self.assertRaises(GraphQLError):
         validate_mutation(validate_dict, dummy_data)
Пример #2
0
 def test_min_value_error(self):
     min_value = randint(0, 100)
     validate_dict = {'dummy': {'min': min_value}}
     dummy_data = {'dummy': min_value - 1}
     with self.assertRaises(GraphQLError):
         validate_mutation(validate_dict, dummy_data)
Пример #3
0
 def test_min_length_success(self):
     min_length = randint(0, 100)
     validate_dict = {'dummy': {'min': min_length}}
     dummy_data = {'dummy': randStr(N=min_length)}
     validate_mutation(validate_dict, dummy_data)
Пример #4
0
 def test_min_value_success(self):
     min_value = randint(0, 100)
     validate_dict = {'dummy': {'min': min_value}}
     dummy_data = {'dummy': min_value}
     validate_mutation(validate_dict, dummy_data)