[ckan-changes] commit/ckan: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Tue Sep 13 07:55:25 UTC 2011


2 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/171fe49590f1/
changeset:   171fe49590f1
branch:      feature-1294-ux-improvements-dataset
user:        rgrp
date:        2011-09-13 09:48:34
summary:     [templates/package/new][xs]: remove commented out instructions for resources as it causes problems for sensitive html tests in test_authz.py.

* NB: were not planning to reintroduce these instructions (and if wanted can be recovered from history here).
affected #:  1 file (1.2 KB)

--- a/ckan/templates/package/new_package_form.html	Mon Sep 12 17:48:56 2011 +0100
+++ b/ckan/templates/package/new_package_form.html	Tue Sep 13 08:48:34 2011 +0100
@@ -139,13 +139,6 @@
     </ul><div class="resource-add-form"></div></div>
-
-  <!--
-  <div class="instructions basic">The files containing the data or address of the APIs for accessing it.</div>
-  <div class="instructions further"><br />These can be repeated as required. For example if the data is being supplied in multiple formats, or split into different areas or time periods, each file is a different 'resource' which should be described differently. They will all appear on the dataset page on CKAN together.<br /><br /><b>URL:</b> This is the Internet link directly to the data - by selecting this link in a web browser, the user will immediately download the full dataset. Note that datasets are not hosted on this site, but by the publisher of the data. Alternatively the URL can point to an API server such as a SPARQL endpoint or JSON-P service.<br /><b>Format:</b> This should give the file format in which the data is supplied. <br /><b>Description</b> Any information you want to add to describe the resource.<br /></div>
-  <div class="hints">Format choices: CSV | RDF | XML | XBRL | SDMX | HTML+RDFa | Other as appropriate</div>
-  <div class="field_error" py:if="errors.get('resources', '')">Dataset resource(s) incomplete.</div>
-  --></fieldset><fieldset id="groups">


http://bitbucket.org/okfn/ckan/changeset/f7d8e4433111/
changeset:   f7d8e4433111
branch:      feature-1294-ux-improvements-dataset
user:        rgrp
date:        2011-09-13 09:54:39
summary:     [tests/functional/test_authz][xs]: fix up tests broken by minor html changes (nothing of substance!).

* e.g. delete test broken because 'state' now appeared in js dumped at top of the page.
affected #:  1 file (286 bytes)

--- a/ckan/tests/functional/test_authz.py	Tue Sep 13 08:48:34 2011 +0100
+++ b/ckan/tests/functional/test_authz.py	Tue Sep 13 08:54:39 2011 +0100
@@ -98,10 +98,15 @@
                 offset = '/%s/list' % entity
         elif action == 'create':
             offset = '/%s/new' % entity
-            str_required_in_response = 'New'
+            if entity == 'dataset':
+                str_required_in_response = 'Add'
+            else:
+                str_required_in_response = 'New'
         elif action == 'delete':
             offset = url_for(controller=controller_name, action=model.Action.EDIT, id=unicode(entity_name))
-            str_required_in_response = 'state'
+            # this is ludicrously sensitive (we have to improve html testing!)
+            # str_required_in_response = 'state'
+            str_required_in_response = '<select id="state"'
         else:
             raise NotImplementedError
         res = self.app.get(offset, extra_environ={'REMOTE_USER': user.name.encode('utf8')}, expect_errors=True)
@@ -110,6 +115,8 @@
         tests['error string'] = bool('error' not in res)
         tests['status'] = bool(res.status in (200, 201))
         tests['0 packages found'] = bool(u'0 packages found' not in res)
+        print tests
+        print res
         is_ok = False not in tests.values()
         # clear flash messages - these might make the next page request
         # look like it has an error
@@ -376,7 +383,7 @@
         assert not model.Package.by_name(u'annakarenina')
         offset = url_for(controller='package', action='new')
         res = self.app.get(offset, extra_environ={'REMOTE_USER': user.name.encode('utf8')})
-        assert 'New - Datasets' in res
+        assert 'Add - Datasets' in res
         fv = res.forms['dataset-edit']
         prefix = ''
         fv[prefix + 'name'] = u'annakarenina'

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