def __repr__(self):
     return format_repr(self,
                        'id',
                        'type',
                        'start_dt',
                        'end_dt',
                        _repr=self.object)
示例#2
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'event_id',
                        no_score=False,
                        is_deleted=False,
                        _text=self.text)
示例#3
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'email',
                        is_deleted=False,
                        is_pending=False,
                        _text=self.full_name)
示例#4
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'type',
                        'revision_id',
                        'user_id',
                        proposed_action=None)
示例#5
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'person_id',
                        'abstract_id',
                        is_speaker=False,
                        author_type=None,
                        _text=self.full_name)
示例#6
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'registration_form_id',
                        is_enabled=True,
                        is_deleted=False,
                        is_manager_only=False,
                        _text=self.title)
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'event_id',
                        'principal',
                        read_access=False,
                        full_access=False,
                        roles=[])
示例#8
0
 def __repr__(self):
     full_name = '{} {}'.format(self.first_name, self.last_name)
     return format_repr(self,
                        'id',
                        'registration_form_id',
                        'email',
                        'state',
                        _text=full_name)
def test_format_repr(args, kwargs, output):
    class Foo(object):
        def __init__(self, **kwargs):
            self.__dict__.update(kwargs)

    class MyEnum(Enum):
        foo = 'bar'

    obj = Foo(id=1,
              enum=MyEnum.foo,
              hello='world',
              dct={'a': 'b'},
              flag1=True,
              flag0=False)
    assert format_repr(obj, *args, **kwargs) == output
示例#10
0
 def __repr__(self):
     return format_repr(self, 'id', is_deleted=False, _text=self.title)
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'event_id',
                        'reference_type_id',
                        _text=self.value)
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'event_id',
                        is_deleted=False,
                        _text=text_to_repr(self.title))
示例#13
0
 def __repr__(self):
     return format_repr(self, 'id', _text=self.title)
示例#14
0
 def __repr__(self):
     return format_repr(self, 'id', 'start_dt', 'end_dt', is_deleted=False, is_locked=False,
                        _text=text_to_repr(self.title, max_length=75))
示例#15
0
 def __repr__(self):
     return format_repr(self, 'id', 'user_id', 'event_id', _text=', '.join(self.competences))
示例#16
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        is_untrusted=False,
                        _text=self.full_name)
 def __repr__(self):
     # in case of a new object we might not have the default status set
     status = TransactionStatus(self.status).name if self.status is not None else None
     return format_repr(self, 'id', 'registration_id', 'provider', 'amount', 'currency', 'timestamp', status=status)
示例#18
0
 def __repr__(self):
     text = text_to_repr(self.data) if isinstance(self.data, unicode) else self.data
     return format_repr(self, 'contribution_id', 'contribution_field_id', _text=text)
示例#19
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        is_deleted=False,
                        _text=text_to_repr(self.title, max_length=75))
示例#20
0
 def __repr__(self):
     return format_repr(self, 'id', '_contribution_id', content_type=None, _text=text_to_repr(self.filename))
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'event_id',
                        'category_id',
                        _text=self.title)
示例#22
0
 def __repr__(self):
     return format_repr(self, 'id', 'abstract_id', is_deleted=False, _text=text_to_repr(self.text))
 def __repr__(self):
     return format_repr(self, 'id', 'url_template', _text=self.name)
示例#24
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'person_id',
                        'event_id',
                        _text=self.full_name)
示例#25
0
 def __repr__(self):
     return format_repr(self,
                        'id',
                        'abstract_id',
                        content_type=None,
                        _text=text_to_repr(self.filename))
 def __repr__(self):
     return format_repr(self, 'id', 'subcontribution_id', 'reference_type_id', _text=self.value)
示例#27
0
 def __repr__(self):
     return format_repr(self, 'id', 'field_type', is_required=False, is_active=True, _text=self.title)
示例#28
0
 def __repr__(self):
     return format_repr(self, 'legacy_page_id', 'page_id')
 def __repr__(self):
     return format_repr(self, 'event_id', 'legacy_session_id',
                        'legacy_session_block_id', 'session_block_id')
 def __repr__(self):
     return format_repr(self, 'email')