18
18
Empty the subscribers list:
20
>>> firefox_question.unsubscribe(sample_person)
20
>>> firefox_question.unsubscribe(sample_person, sample_person)
21
21
>>> list(firefox_question.subscriptions)
36
36
>>> workflow_harness.submit('requestinfo', form_data)
37
37
>>> firefox_question.isSubscribed(foo_bar)
39
>>> firefox_question.unsubscribe(foo_bar)
39
>>> firefox_question.unsubscribe(foo_bar, foo_bar)
41
41
Subscription is possible when providing more information:
44
44
>>> workflow_harness.submit('giveinfo', form_data)
45
45
>>> firefox_question.isSubscribed(sample_person)
47
>>> firefox_question.unsubscribe(sample_person)
47
>>> firefox_question.unsubscribe(sample_person, sample_person)
49
49
Subscription is possible when providing an answer:
52
52
>>> workflow_harness.submit('answer', form_data)
53
53
>>> firefox_question.isSubscribed(foo_bar)
55
>>> firefox_question.unsubscribe(foo_bar)
55
>>> firefox_question.unsubscribe(foo_bar, foo_bar)
57
57
As when confirming an answer (altough this is probably not that common):
60
60
>>> workflow_harness.submit('confirm', dict(answer_id=-1, **form_data))
61
61
>>> firefox_question.isSubscribed(sample_person)
63
>>> firefox_question.unsubscribe(sample_person)
63
>>> firefox_question.unsubscribe(sample_person, sample_person)
65
65
It is also possible when reopening the request.
67
67
>>> workflow_harness.submit('reopen', form_data)
68
68
>>> firefox_question.isSubscribed(sample_person)
70
>>> firefox_question.unsubscribe(sample_person)
70
>>> firefox_question.unsubscribe(sample_person, sample_person)
72
72
Self-Answering the request:
74
74
>>> workflow_harness.submit('selfanswer', form_data)
75
75
>>> firefox_question.isSubscribed(sample_person)
77
>>> firefox_question.unsubscribe(sample_person)
77
>>> firefox_question.unsubscribe(sample_person, sample_person)
79
79
As well as adding a comment:
81
81
>>> workflow_harness.submit('comment', form_data)
82
82
>>> firefox_question.isSubscribed(sample_person)
84
>>> firefox_question.unsubscribe(sample_person)
84
>>> firefox_question.unsubscribe(sample_person, sample_person)
86
86
Make sure that whenever the view actions is modified, this test