@@ -826,7 +826,7 @@ def testXMLTemplate(self):
826826 cl = self .setupClient ({ }, 'issue' ,
827827 env_addon = {'HTTP_REFERER' : 'http://whoami.com/path/' })
828828 out = pt .render (cl , 'issue' , MockNull ())
829- self .assertEquals (out , '<?xml version="1.0" encoding="UTF-8"?><feed\n xmlns="http://www.w3.org/2005/Atom"/>\n ' )
829+ self .assertEqual (out , '<?xml version="1.0" encoding="UTF-8"?><feed\n xmlns="http://www.w3.org/2005/Atom"/>\n ' )
830830
831831 def testCsrfProtection (self ):
832832 # need to set SENDMAILDEBUG to prevent
@@ -1503,8 +1503,8 @@ def my_serve_file(a, b, c, d):
15031503 # TEMPLATES dir is searched by default. So this file exists.
15041504 # Check the returned values.
15051505 cl .serve_static_file ("issue.index.html" )
1506- self .assertEquals (output [0 ][1 ], "text/html" )
1507- self .assertEquals (output [0 ][3 ], "_test_cgi_form/html/issue.index.html" )
1506+ self .assertEqual (output [0 ][1 ], "text/html" )
1507+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/html/issue.index.html" )
15081508 del output [0 ] # reset output buffer
15091509
15101510 # stop searching TEMPLATES for the files.
@@ -1516,23 +1516,23 @@ def my_serve_file(a, b, c, d):
15161516 # explicitly allow html directory
15171517 cl .instance .config ['STATIC_FILES' ] = 'html -'
15181518 cl .serve_static_file ("issue.index.html" )
1519- self .assertEquals (output [0 ][1 ], "text/html" )
1520- self .assertEquals (output [0 ][3 ], "_test_cgi_form/html/issue.index.html" )
1519+ self .assertEqual (output [0 ][1 ], "text/html" )
1520+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/html/issue.index.html" )
15211521 del output [0 ] # reset output buffer
15221522
15231523 # set the list of files and do not look at the templates directory
15241524 cl .instance .config ['STATIC_FILES' ] = 'detectors extensions - '
15251525
15261526 # find file in first directory
15271527 cl .serve_static_file ("messagesummary.py" )
1528- self .assertEquals (output [0 ][1 ], "text/x-python" )
1529- self .assertEquals (output [0 ][3 ], "_test_cgi_form/detectors/messagesummary.py" )
1528+ self .assertEqual (output [0 ][1 ], "text/x-python" )
1529+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/detectors/messagesummary.py" )
15301530 del output [0 ] # reset output buffer
15311531
15321532 # find file in second directory
15331533 cl .serve_static_file ("README.txt" )
1534- self .assertEquals (output [0 ][1 ], "text/plain" )
1535- self .assertEquals (output [0 ][3 ], "_test_cgi_form/extensions/README.txt" )
1534+ self .assertEqual (output [0 ][1 ], "text/plain" )
1535+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/extensions/README.txt" )
15361536 del output [0 ] # reset output buffer
15371537
15381538 # make sure an embedded - ends the searching.
@@ -1546,32 +1546,32 @@ def my_serve_file(a, b, c, d):
15461546 f = open ('_test_cgi_form/detectors/README.txt' , 'a' ).close ()
15471547 # find file now in first directory
15481548 cl .serve_static_file ("README.txt" )
1549- self .assertEquals (output [0 ][1 ], "text/plain" )
1550- self .assertEquals (output [0 ][3 ], "_test_cgi_form/detectors/README.txt" )
1549+ self .assertEqual (output [0 ][1 ], "text/plain" )
1550+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/detectors/README.txt" )
15511551 del output [0 ] # reset output buffer
15521552
15531553 cl .instance .config ['STATIC_FILES' ] = ' detectors extensions '
15541554 # make sure lack of trailing - allows searching TEMPLATES
15551555 cl .serve_static_file ("issue.index.html" )
1556- self .assertEquals (output [0 ][1 ], "text/html" )
1557- self .assertEquals (output [0 ][3 ], "_test_cgi_form/html/issue.index.html" )
1556+ self .assertEqual (output [0 ][1 ], "text/html" )
1557+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/html/issue.index.html" )
15581558 del output [0 ] # reset output buffer
15591559
15601560 # Make STATIC_FILES a single element.
15611561 cl .instance .config ['STATIC_FILES' ] = 'detectors'
15621562 # find file now in first directory
15631563 cl .serve_static_file ("messagesummary.py" )
1564- self .assertEquals (output [0 ][1 ], "text/x-python" )
1565- self .assertEquals (output [0 ][3 ], "_test_cgi_form/detectors/messagesummary.py" )
1564+ self .assertEqual (output [0 ][1 ], "text/x-python" )
1565+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/detectors/messagesummary.py" )
15661566 del output [0 ] # reset output buffer
15671567
15681568 # make sure files found in subdirectory
15691569 os .mkdir ('_test_cgi_form/detectors/css' )
15701570 f = open ('_test_cgi_form/detectors/css/README.css' , 'a' ).close ()
15711571 # use subdir in filename
15721572 cl .serve_static_file ("css/README.css" )
1573- self .assertEquals (output [0 ][1 ], "text/css" )
1574- self .assertEquals (output [0 ][3 ], "_test_cgi_form/detectors/css/README.css" )
1573+ self .assertEqual (output [0 ][1 ], "text/css" )
1574+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/detectors/css/README.css" )
15751575 del output [0 ] # reset output buffer
15761576
15771577
@@ -1580,8 +1580,8 @@ def my_serve_file(a, b, c, d):
15801580 os .mkdir ('_test_cgi_form/html/css' )
15811581 f = open ('_test_cgi_form/html/css/README1.css' , 'a' ).close ()
15821582 cl .serve_static_file ("README1.css" )
1583- self .assertEquals (output [0 ][1 ], "text/css" )
1584- self .assertEquals (output [0 ][3 ], "_test_cgi_form/html/css/README1.css" )
1583+ self .assertEqual (output [0 ][1 ], "text/css" )
1584+ self .assertEqual (output [0 ][3 ], "_test_cgi_form/html/css/README1.css" )
15851585 del output [0 ] # reset output buffer
15861586
15871587
@@ -1635,7 +1635,7 @@ def testCSVExport(self):
16351635 # call export version that outputs id numbers
16361636 actions .ExportCSVWithIdAction (cl ).handle ()
16371637 print (output .getvalue ())
1638- self .assertEquals ('id,title,status,keyword,assignedto,nosy\r \n '
1638+ self .assertEqual ('id,title,status,keyword,assignedto,nosy\r \n '
16391639 "1,foo1,2,[],4,\" ['3', '4', '5']\" \r \n "
16401640 "2,bar2,1,\" ['1', '2']\" ,3,['3']\r \n "
16411641 '3,baz32,4,[],None,[]\r \n ' ,
@@ -1682,7 +1682,7 @@ def testCSVExportFailPermissionValidColumn(self):
16821682
16831683 actions .ExportCSVAction (cl ).handle ()
16841684 #print(output.getvalue())
1685- self .assertEquals ('id,username,address,password\r \n '
1685+ self .assertEqual ('id,username,address,password\r \n '
16861686 '1,admin,[hidden],[hidden]\r \n '
16871687 '2,anonymous,[hidden],[hidden]\r \n '
16881688 '3,Chef,[hidden],[hidden]\r \n '
@@ -1698,7 +1698,7 @@ def testCSVExportWithId(self):
16981698 cl .request = MockNull ()
16991699 cl .request .wfile = output
17001700 actions .ExportCSVWithIdAction (cl ).handle ()
1701- self .assertEquals ('id,name\r \n 1,unread\r \n 2,deferred\r \n 3,chatting\r \n '
1701+ self .assertEqual ('id,name\r \n 1,unread\r \n 2,deferred\r \n 3,chatting\r \n '
17021702 '4,need-eg\r \n 5,in-progress\r \n 6,testing\r \n 7,done-cbb\r \n '
17031703 '8,resolved\r \n ' ,
17041704 output .getvalue ())
@@ -2050,6 +2050,6 @@ def testTemplateSubdirectory(self):
20502050
20512051 # template check works
20522052 r = t .selectTemplate ("user" , "subdir/item" )
2053- self .assertEquals ("subdir/user.item" , r )
2053+ self .assertEqual ("subdir/user.item" , r )
20542054
20552055# vim: set filetype=python sts=4 sw=4 et si :
0 commit comments