Ejemplo n.º 1
0
 def _term_regex():
     assert isinstance(self.term_regex, (compat.basestring, tuple))
     if isinstance(self.term_regex, compat.basestring):
         assert_string(self.term_regex)
     else:
         assert_iterable(self.term_regex, compat.basestring, tuple)
         assert len(self.term_regex) > 1
         assert self.term_regex[0].count('{}') == (len(self.term_regex) - 1)
         for identifier in self.term_regex[1:]:
             assert_namespace(identifier, min_length=3, max_length=4)
Ejemplo n.º 2
0
 def _canonical_name():
     assert_string(self.canonical_name)
     assert_regex(self.canonical_name, REGEX_CANONICAL_NAME)
Ejemplo n.º 3
0
 def _description():
     if isinstance(self, IterableNode):
         assert_string(self.description)
     elif self.description is not None:
         assert_string(self.description)
Ejemplo n.º 4
0
 def _label():
     if self.label is not None:
         assert_string(self.label)
Ejemplo n.º 5
0
 def _canonical_name():
     assert_string(self.canonical_name)
     if isinstance(self.collection.term_regex, compat.basestring):
         assert_regex(self.canonical_name, self.collection.term_regex)