Thomas Waldmann  committed 90df744

more name-related code/test fixes

  • Participants
  • Parent commits d2704c2
  • Branches namespaces

Comments (0)

Files changed (4)

File MoinMoin/_tests/

         itemname = u"this item shouldn't exist yet"
         assert not storage.has_item(itemname)
         item = storage[itemname]
-        new_rev = item.store_revision({NAME: itemname, CONTENTTYPE: u'text/plain'}, StringIO(''))
+        new_rev = item.store_revision({NAME: [itemname, ], CONTENTTYPE: u'text/plain'}, StringIO(''))
         assert storage.has_item(itemname)

File MoinMoin/storage/middleware/_tests/

 from import BytesStore as MemoryBytesStore
 from import FileStore as MemoryFileStore
 from import create_simple_mapping
-from import routing
 def dumper(indexer, idx_name):

File MoinMoin/storage/middleware/

                  keys.ADDRESS: remote_addr,
                  keys.USERID: userid,
                  keys.WIKINAME: wikiname,
-                 keys.NAMESPACE: u'',
+                 keys.NAMESPACE: None,
                  keys.ITEMID: self.itemid, # real itemid or None
                  'contenttype_current': contenttype_current,
                  'contenttype_guessed': contenttype_guessed,

File MoinMoin/storage/middleware/

             # if there is no NAMESPACE in metadata, we assume that the NAME
             # is fully qualified and determine the namespace from it:
             fq_names = meta[NAME]
-            if not isinstance(fq_names, list):
-                fq_names = [fq_names]
+            assert isinstance(fq_names, list)
             backend_name, item_names, namespace = self._get_backend(fq_names)
             # side effect: update the metadata with namespace and short item name (no ns)
             meta[NAMESPACE] = namespace