582 |
try: |
try: |
583 |
self.session = load_session(self.filename()) |
self.session = load_session(self.filename()) |
584 |
except LoadError, value: |
except LoadError, value: |
585 |
pass |
# Check the actual messge in value to make sure the |
586 |
|
# LoadError really was about the missing attribute |
587 |
|
self.assertEquals(str(value), |
588 |
|
"Element " |
589 |
|
"(u'http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd'," |
590 |
|
" u'fileshapesource') requires an attribute 'filetype'") |
591 |
else: |
else: |
592 |
self.fail("Missing filetype attribute doesn't raise LoadError") |
self.fail("Missing filetype attribute doesn't raise LoadError") |
593 |
|
|