Ejemplo n.º 1
0
 def validate(self):
     """Validate this field"""
     self._val_results = self.val_results_header_and_field_exists()
     if self.found:
         self._val_results += [
             val.left_right_order(self),
             val.not_empty(self.values),
         ]
Ejemplo n.º 2
0
def test_cells_not_empty():
    passing_values = [True, False, "hello", 42]
    failing_values = [None, ""]
    values = failing_values + passing_values

    failing_indices = list(range(len(failing_values)))
    results = val.not_empty(values)
    assert results.indices == failing_indices
Ejemplo n.º 3
0
 def validate(self):
     """Validate this field"""
     self._val_results = self.val_results_header_and_field_exists()
     if self.found:
         self._val_results += [
             val.left_right_order(self),
             val.not_empty(self.values),
             val.cascade_level_valid_input(self),
             val.cascade_block_match(),
         ]
Ejemplo n.º 4
0
 def validate(self):
     """Validate this field"""
     self._val_results = self.val_results_header_and_field_exists()
     if self.found:
         self._val_results += [
             val.left_right_order(self),  # LEFT/RIGHT ORDER
             val.not_empty(self.values),  # NOT EMPTY
             val.missing_tags(),  # MISSING TAGS
             val.custom_tags(),  # CUSTOM TAGS
             val.parent_child_modifiers(),  # PARENT/CHILD MODIFIERS
             val.mutual_parent_child(),  # MUTUAL PARENT/CHILD
         ]
Ejemplo n.º 5
0
def get_cascade_level_not_empty():
    fields = context.fields.get()
    cascade_field = fields.get_field_object('CascadeLevel')
    results = val.not_empty(cascade_field.values)
    return results