Mercurial > p > roundup > code
annotate test/test_textfmt.py @ 3826:bf2e9535da00
Journal and database testing.
- Add to Import/Export test to also test that journals are correctly
retrieved
- Fix a bug in anydbm backend that didn't export journal 'set' actions
where the previous value was None -- all other backends export them
correctly so I consider this a bug of anydbm
- Fix journal import/export of Date and Interval for metakit
- Fix journal import of Password for metakit
- Fix setting of Password oldvalue for metakit -- this would be written
as the string "None" instead of the value None. Note that existing
databases *will* have wrong log-entries. Since this is only for
passwords -- and old passwords aren't of much importance -- I consider
this fix to be enough... This fix makes the Journal import/export test
run for metakit.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 14 Mar 2007 15:23:11 +0000 |
| parents | f35ece8f8ff7 |
| children | 364c54991861 |
| rev | line source |
|---|---|
|
3644
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
1 import unittest |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
2 |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
3 from roundup.support import wrap |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
4 |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
5 class WrapTestCase(unittest.TestCase): |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 def testWrap(self): |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
7 lorem = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit.''' |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
8 wrapped = '''Lorem ipsum dolor |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
9 sit amet, |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
10 consectetuer |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
11 adipiscing elit.''' |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 self.assertEquals(wrap(lorem, 20), wrapped) |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
13 |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
14 def test_suite(): |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
15 suite = unittest.TestSuite() |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
16 suite.addTest(unittest.makeSuite(WrapTestCase)) |
|
f35ece8f8ff7
added StringHTMLProperty wrapped() method to wrap long lines in issue display
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
17 return suite |
