Index: /main/waeup.sirp/trunk/src/waeup/sirp/utils/importexport.txt
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/utils/importexport.txt	(revision 5010)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/utils/importexport.txt	(revision 5011)
@@ -18,4 +18,23 @@
     >>> grok.testing.grok('waeup')
 
+Furthermore we need something to import/export. As only pickable
+classes are importable/exportable and these have to be defined in some
+globally reachable module, we first define some silly object in
+filesystem and adjust the path to lookup modules:
+
+    >>> import os
+    >>> import sys
+    >>> os.mkdir('stoneage')
+    >>> old_sys_path = sys.path
+    >>> open(os.path.join('stoneage', '__init__.py'), 'wb').write(
+    ... """
+    ... class Cave(object):
+    ...   name = 'Unnamed cave'
+    ...   dinoports = 2
+    ... """)
+    >>> sys.path.append(os.getcwd())
+
+Now we can import stoneage.Cave objects.
+
 
 Exporting XML
@@ -28,12 +47,10 @@
 i.e. an in-memory file.
 
-To show this basic functionality provided for all XML exportable
-objects, we choose faculties.
+We can export caves. First we create a cave:
 
-We can export faculties. First we create a faculty::
-
-    >>> from waeup.sirp.university.faculty import Faculty
-    >>> myfaculty = Faculty()
-    >>> myfaculty.name = 'My very faculty.'
+    >>> from stoneage import Cave
+    >>> mycave = Cave()
+    >>> mycave.name = 'Freds Cave'
+    >>> mycave.dinoports = 1
 
 Exporting plain XML
@@ -44,5 +61,5 @@
 
     >>> from waeup.sirp.interfaces import IWAeUPXMLExporter
-    >>> exporter = IWAeUPXMLExporter(myfaculty)
+    >>> exporter = IWAeUPXMLExporter(mycave)
     >>> exporter
     <waeup.sirp.utils.importexport.XMLExporter object at 0x...>
@@ -68,12 +85,8 @@
     <?xml version="1.0" encoding="utf-8" ?>
     <pickle>
-      <initialized_object>
+      <object>
     ...
     </pickle>
 
-Clean up::
-
-    >>> import os
-    >>> os.unlink('myexport.xml')
 
 Importing XML
@@ -82,25 +95,12 @@
 We can generate objects from XML.
 
-Let's create a faculty instance, that we want to be restored
-afterwards::
+We change the name of the cave:
 
-    >>> from waeup.sirp.university.faculty import Faculty
-    >>> myfaculty = Faculty()
-    >>> myfaculty.name = 'My very faculty.'
+    >>> mycave.name = 'Another name'
 
-We create an XML dump of this object::
-
-    >>> from waeup.sirp.interfaces import IWAeUPXMLExporter
-    >>> exporter = IWAeUPXMLExporter(myfaculty)
-    >>> result = exporter.export('myexport.xml')
-
-We change the name of the faculty::
-
-    >>> myfaculty.name = 'Another name'
-
-Now we create an importer for that file::
+Now we create an importer for that object:
 
     >>> from waeup.sirp.interfaces import IWAeUPXMLImporter
-    >>> importer = IWAeUPXMLImporter(myfaculty)
+    >>> importer = IWAeUPXMLImporter(mycave)
 
 Importing from filenames
@@ -111,15 +111,15 @@
     >>> new_obj = importer.doImport('myexport.xml')
 
-The object created is indeed a faculty::
+The object created is indeed a cave::
 
     >>> new_obj
-    <waeup.sirp.university.faculty.Faculty object at 0x...>
+    <stoneage.Cave object at 0x...>
 
     >>> new_obj.name
-    'My very faculty.'
+    'Freds Cave'
 
 The new object is really a new object::
 
-    >>> new_obj is myfaculty
+    >>> new_obj is mycave
     False
 
@@ -135,8 +135,11 @@
 
     >>> new_obj
-    <waeup.sirp.university.faculty.Faculty object at 0x...>
+    <stoneage.Cave object at 0x...>
 
 Clean up::
 
     >>> import os
+    >>> import shutil
+    >>> sys.path = old_sys_path
     >>> os.unlink('myexport.xml')
+    >>> shutil.rmtree('stoneage')
