[ckan-changes] commit/ckan: dread: [controller]: #1078 Fix test for "bookmarklet fix".

Bitbucket commits-noreply at bitbucket.org
Fri Jun 10 11:07:12 UTC 2011


1 new changeset in ckan:

http://bitbucket.org/okfn/ckan/changeset/b654ad375233/
changeset:   b654ad375233
branch:      release-v1.4.1
user:        dread
date:        2011-06-10 13:07:00
summary:     [controller]: #1078 Fix test for "bookmarklet fix".
affected #:  1 file (183 bytes)

--- a/ckan/tests/functional/test_package.py	Thu Jun 09 22:49:46 2011 +0100
+++ b/ckan/tests/functional/test_package.py	Fri Jun 10 12:07:00 2011 +0100
@@ -6,6 +6,7 @@
 from genshi.core import escape as genshi_escape
 from difflib import unified_diff
 from nose.plugins.skip import SkipTest
+from nose.tools import assert_equal
 
 from ckan.tests import *
 from ckan.tests import search_related
@@ -918,18 +919,11 @@
 
     def test_new_with_params_1(self):
         offset = url_for(controller='package', action='new',
-                url='http://xxx.org')
+                url='http://xxx.org', name='xxx.org')
         res = self.app.get(offset)
         form = res.forms['package-edit']
-        form['url'].value == 'http://xxx.org/'
-        form['name'].value == 'xxx.org'
-
-    def test_new_with_params_2(self):
-        offset = url_for(controller='package', action='new',
-                url='http://www.xxx.org')
-        res = self.app.get(offset)
-        form = res.forms['package-edit']
-        form['name'].value == 'xxx.org'
+        assert_equal(form['url'].value, 'http://xxx.org')
+        assert_equal(form['name'].value, 'xxx.org')
 
     def test_new_without_resource(self):
         # new package

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list