~james-w/python-oops-tools/prod-deploy

« back to all changes in this revision

Viewing changes to src/oopstools/oops/test/report.txt

  • Committer: Tarmac
  • Author(s): Robert Collins
  • Date: 2012-08-07 04:00:58 UTC
  • mfrom: (36.1.3 fix-reports)
  • Revision ID: launchpad@pqm.canonical.com-20120807040058-hjm5b8ip66cnj1ro
Fix and test the per-report to address setting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
    >>> from_addr
120
120
    'OOPS Summaries <test@example.com>'
121
121
 
 
122
The global default email address was used.
122
123
    >>> to_addr
123
124
    'test@example.com'
124
125
 
139
140
 
140
141
    >>> helpers._today = date(2007, 11, 21)
141
142
 
 
143
At the same time, we want to set a custom report address.
 
144
 
 
145
    >>> example_report.recipient = "demo@example.com"
 
146
    >>> example_report.save()
 
147
 
142
148
Run the script again.
143
149
 
144
150
    >>> report_mod.main()
159
165
    'OOPS Summaries <test@example.com>'
160
166
 
161
167
    >>> to_addr
162
 
    'test@example.com'
 
168
    'demo@example.com'
163
169
 
164
170
    >>> message = message_from_string(msg)
165
171
 
166
172
    >>> message.get('Reply-To')
167
 
    'test@example.com'
 
173
    'demo@example.com'
168
174
 
169
175
    >>> message.get('Subject')
170
176
    'Example report Errors for 2007-11-20'