- Files:
-
- 1 modified
-
relatorio/tests/test_api.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
relatorio/tests/test_api.py
r89 r80 11 11 # This program is distributed in the hope that it will be useful, but WITHOUT 12 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 13 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 14 14 # details. 15 15 # … … 39 39 "Testing the registration" 40 40 reporting = ReportRepository() 41 reporting.add_report(StubObject, 'text/plain', 41 reporting.add_report(StubObject, 'text/plain', 42 42 os.path.join('templates', 'test.tmpl')) 43 43 … … 49 49 eq_(mime, 'text/plain') 50 50 eq_(report.mimetype, 'text/plain') 51 assert_true(report.fpath.endswith(os.path.join('templates', 51 assert_true(report.fpath.endswith(os.path.join('templates', 52 52 'test.tmpl'))) 53 53 … … 105 105 106 106 a = StubObject(name='Foo') 107 eq_(report(o=a, time="One o'clock").render(), 107 eq_(report(o=a, time="One o'clock").render(), 108 108 "Hi Foo,\nIt's One o'clock to 2 !\n") 109 eq_(report(o=a, time="One o'clock", y=4).render(), 109 eq_(report(o=a, time="One o'clock", y=4).render(), 110 110 "Hi Foo,\nIt's One o'clock to 5 !\n") 111 assert_raises(TypeError, report, a) 111 assert_raises(TypeError, report, a) 112 112
