Commits

Anonymous committed 4fa22fc

Don't use deprecated ``url_for()`` in tests.

Comments (0)

Files changed (1)

     # Can't find a 'message' argument that matches the warning.
 
 from nose.tools import eq_
-from routes import url_for
 
 from webhelpers.html import HTML, literal
 import webhelpers.html.render as render
 
     def test_button_to_with_img(self):
         self.assertEqual(u'<form action="/content/edit/3" class="button-to" method="POST"><div><input alt="Edit" src="/images/icon_delete.gif" type="image" value="Edit" /></div></form>',
-                         button_to("Edit", url_for(action='edit', id=3), type='image', src='/images/icon_delete.gif'))
+                         button_to("Edit", '/content/edit/3', type='image', src='/images/icon_delete.gif'))
         self.assertEqual(u'<form action="/content/submit/3" class="button-to" method="POST"><div><input alt="Complete the form" src="submit.png" type="image" value="Submit" /></div></form>',
-                         button_to("Submit", url_for(action='submit', id=3), type='image', src='submit.png', alt='Complete the form'))
+                         button_to("Submit", '/content/submit/3', type='image', src='submit.png', alt='Complete the form'))
 
     def test_mail_to(self):
         self.assertEqual(u'<a href="mailto:justin@example.com">justin@example.com</a>', mail_to("justin@example.com"))