mirror of
https://github.com/jazzband/django-eav2.git
synced 2026-03-16 22:40:26 +00:00
Make doctest skip invalid tests
This commit is contained in:
parent
7f92a4ec20
commit
7d3016cfbc
1 changed files with 5 additions and 4 deletions
|
|
@ -57,16 +57,17 @@ class EnumValue(models.Model):
|
|||
|
||||
For example:
|
||||
|
||||
>>> yes = EnumValue.objects.create(value='Yes')
|
||||
>>> yes = EnumValue.objects.create(value='Yes') # doctest: SKIP
|
||||
>>> no = EnumValue.objects.create(value='No')
|
||||
>>> unkown = EnumValue.objects.create(value='Unkown')
|
||||
|
||||
>>> ynu = EnumGroup.objects.create(name='Yes/No/Unkown')
|
||||
>>> ynu = EnumGroup.objects.create(name='Yes / No / Unkown')
|
||||
>>> ynu.enums.add(yes, no, unkown)
|
||||
|
||||
>>> Attribute.objects.create(name='Has fever?',
|
||||
>>> Attribute.objects.create(name='Has Fever?',
|
||||
... datatype=Attribute.TYPE_ENUM,
|
||||
... enum_group=ynu)
|
||||
<Attribute: Has the fever? (Multiple Choice)>
|
||||
|
||||
.. note::
|
||||
The same *EnumValue* objects should be reused within multiple
|
||||
|
|
@ -533,7 +534,7 @@ class Entity(object):
|
|||
|
||||
This would allow you to do:
|
||||
|
||||
\>\>\> for i in m.eav: print i
|
||||
>>> for i in m.eav: print i # doctest:SKIP
|
||||
'''
|
||||
return iter(self.get_values())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue