1
= Load an OOPS with a HTTP REQUEST_METHOD header too long =
3
This test makes sure the fix for
4
https://bugs.launchpad.net/oops-tools/+bug/672984 works.
6
A sample OOPS with the broken header was added:
8
Try to load that OOPS using the OopsLoader.
10
>>> from django.conf import settings
11
>>> from oopstools.oops.dboopsloader import OopsLoader
12
>>> from oopstools.oops import helpers
13
>>> from datetime import date
14
>>> loader = OopsLoader()
15
>>> start_date = date(2009, 7, 31)
16
>>> helpers._today = start_date
17
>>> found_oopses = loader.find_oopses(start_date=start_date)
18
>>> from pprint import pprint
20
... [(oops, oops.http_method) for oops in
21
... sorted(found_oopses, key=lambda oops: oops.date)])
22
[(<Oops: OOPS-1308X1>, u'1234567890')]
26
>>> from oopstools.oops.helpers import reset_database
28
'Oops, DBOopsRootDirectory and Infestation deleted.'