Skip to content

Commit 5b5be9f

Browse files
author
Travis Hathaway
committed
fixing error that made test fail in python 2.6
1 parent f44726b commit 5b5be9f

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

tests/test_data_types.py

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,18 @@ def test_invalid_property_header(self):
3434
We make sure that properties that are not define in "numeric_fields"
3535
or "alpha_numeric_fields" cannot be defined as object properties.
3636
'''
37-
with nt.assert_raises(dt.AchError):
38-
self.header.test_property = 'testtesttest'
39-
40-
with nt.assert_raises(dt.AchError):
41-
self.file_control.test_property = 'testtesttest'
42-
43-
with nt.assert_raises(dt.AchError):
44-
self.batch_header.test_property = 'testtesttest'
45-
46-
with nt.assert_raises(dt.AchError):
47-
self.batch_control.test_property = 'testtesttest'
48-
49-
with nt.assert_raises(dt.AchError):
50-
self.entry_detail.test_property = 'testtesttest'
51-
52-
with nt.assert_raises(dt.AchError):
53-
self.addenda_record.test_property = 'testtesttest'
37+
nt.assert_raises(dt.AchError, setattr, self.header,
38+
'test_property', 'testtesttest')
39+
nt.assert_raises(dt.AchError, setattr, self.file_control,
40+
'test_property', 'testtesttest')
41+
nt.assert_raises(dt.AchError, setattr, self.batch_header,
42+
'test_property', 'testtesttest')
43+
nt.assert_raises(dt.AchError, setattr, self.batch_control,
44+
'test_property', 'testtesttest')
45+
nt.assert_raises(dt.AchError, setattr, self.entry_detail,
46+
'test_property', 'testtesttest')
47+
nt.assert_raises(dt.AchError, setattr, self.addenda_record,
48+
'test_property', 'testtesttest')
5449

5550
def test_check_digit(self):
5651
'''

0 commit comments

Comments
 (0)