0001-cards-display-first-history-step-with-agent-name-396.patch
tests/test_backoffice_pages.py | ||
---|---|---|
5489 | 5489 |
assert 'Edit Card' in resp.text |
5490 | 5490 |
assert 'Delete Card' in resp.text |
5491 | 5491 | |
5492 |
carddata = carddef.data_class().select()[0] |
|
5493 |
assert carddata.data == {'1': 'ok', '2': 'blah'} |
|
5494 |
assert carddata.user_id is None |
|
5495 |
assert carddata.submission_context == {'agent_id': user.id} |
|
5496 |
assert carddata.evolution[0].who == str(user.id) |
|
5497 |
assert 'Original Submitter' not in resp.text |
|
5498 | ||
5492 | 5499 |
resp = app.get('/backoffice/data/') |
5493 | 5500 |
resp = resp.click('foo') |
5494 | 5501 |
assert resp.text.count('<tr') == 2 # header + row of data |
wcs/carddata.py | ||
---|---|---|
47 | 47 | |
48 | 48 |
def get_display_label(self): |
49 | 49 |
return self.digest or self.get_display_name() |
50 | ||
51 |
def get_author_qualification(self): |
|
52 |
return None |
|
53 | ||
54 |
def just_created(self): |
|
55 |
super(CardData, self).just_created() |
|
56 |
if self.submission_context and 'agent_id' in self.submission_context: |
|
57 |
self.evolution[0].who = self.submission_context['agent_id'] |
|
50 |
- |