[conduit: 26/138] Generate a test ipod folder structure



commit a6537a59119294a4316d523dd7755e903a802a0a
Author: John Carr <john carr unrouted co uk>
Date:   Mon Apr 27 10:24:34 2009 -0700

    Generate a test ipod folder structure
---
 test/soup/modules/ipod.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/test/soup/modules/ipod.py b/test/soup/modules/ipod.py
index bb3d5f3..a1ba97b 100644
--- a/test/soup/modules/ipod.py
+++ b/test/soup/modules/ipod.py
@@ -4,9 +4,11 @@ import soup.modules
 import conduit.modules.iPodModule.iPodModule as iPodModule
 import conduit.utils as Utils
 
+import gpod
+
 def create_fake_ipod():
     dir = Utils.new_tempdir()
-    # create fake directory structure here...
+    assert gpod.gpod.itdb_init_ipod(dir, "MA450", "Test iPod", None)
     return dir
 
 
@@ -38,9 +40,8 @@ class iPodPhoto(soup.modules.ModuleWrapper):
 
     def create_dataprovider(self):
         self.folder = create_fake_ipod()
-        photodp = iPodModule.IPodPhotoSink(self.folder, "")
-        photodp._set_sysinfo("ModelNumStr", "MA450")
-        return self.conduit.wrap_dataprovider(photodp)
+        ipod = iPodModule.IPodPhotoSink(self.folder, "")
+        return self.conduit.wrap_dataprovider(ipod)
 
 
 class iPodMusic(soup.modules.ModuleWrapper):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]