1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: db_test_base.py,v 1.100 2008-08-19 00:52:01 richard Exp $
18+ # $Id: db_test_base.py,v 1.101 2008-08-19 01:40:59 richard Exp $
1919
2020import unittest , os , shutil , errno , imp , sys , time , pprint , sets , base64 , os .path
2121
@@ -280,7 +280,7 @@ def testMultilinkChangeIterable(self):
280280 # try a couple of the built-in iterable types to make
281281 # sure that we accept them and handle them properly
282282 # try a set as input for the multilink
283- nid = self .db .issue .create (title = "spam" , nosy = set (u1 ))
283+ nid = self .db .issue .create (title = "spam" , nosy = sets . Set (u1 ))
284284 if commit : self .db .commit ()
285285 self .assertEqual (self .db .issue .get (nid , "nosy" ), [u1 ])
286286 self .assertRaises (TypeError , self .db .issue .set , nid ,
@@ -290,7 +290,7 @@ def testMultilinkChangeIterable(self):
290290 if commit : self .db .commit ()
291291 self .assertEqual (self .db .issue .get (nid , "nosy" ), [])
292292 # make sure we accept a frozen set
293- self .db .issue .set (nid , nosy = frozenset ([u1 ,u2 ]))
293+ self .db .issue .set (nid , nosy = sets . Set ([u1 ,u2 ]))
294294 if commit : self .db .commit ()
295295 l = [u1 ,u2 ]; l .sort ()
296296 m = self .db .issue .get (nid , "nosy" ); m .sort ()
@@ -1794,9 +1794,9 @@ def dummy_snd(s, to, msg, res=res) :
17941794 self .failUnless ("New submission from admin" in mail_msg )
17951795 self .failUnless ("one two" in mail_msg )
17961796 self .failIf ("File 'test1.txt' not attached" in mail_msg )
1797- self .failUnless (base64 .b64encode ("xxx" ) in mail_msg )
1797+ self .failUnless (base64 .encodestring ("xxx" ). rstrip ( ) in mail_msg )
17981798 self .failUnless ("File 'test2.txt' not attached" in mail_msg )
1799- self .failIf (base64 .b64encode ("yyy" ) in mail_msg )
1799+ self .failIf (base64 .encodestring ("yyy" ). rstrip ( ) in mail_msg )
18001800 finally :
18011801 Mailer .smtp_send = backup
18021802
0 commit comments