Skip to content

Commit

Permalink
Test regular ascii data
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris AtLee committed May 10, 2010
1 parent db1e518 commit 3633085
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions buildbot/test/regressions/test_import_unicode_changes.py
Expand Up @@ -55,6 +55,20 @@ def testNonUnicodeChange(self):
sm = manager.DBSchemaManager(self.spec, self.basedir)
self.assertRaises(UnicodeDecodeError, sm.upgrade)

def testAsciiChange(self):
# Create changes.pck
changes = [Change(who="Frosty the Snowman",
files=["foo"], comments="Frosty the Snowman", branch="b1", revision=12345)]
cPickle.dump(Thing(changes=changes), open(os.path.join(self.basedir, "changes.pck"), "w"))

sm = manager.DBSchemaManager(self.spec, self.basedir)
sm.upgrade()

c = self.db.getChangeNumberedNow(1)

self.assertEquals(c.who, "Frosty the Snowman")
self.assertEquals(c.comments, "Frosty the Snowman")

class TestMySQLDBUnicodeChanges(TestUnicodeChanges):
def setUp(self):
self.basedir = "MySQLDBUnicodeChanges"
Expand Down

0 comments on commit 3633085

Please sign in to comment.