From 46e1fa2ec1c113053ccc9a358364de926afeb2c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Thu, 1 Sep 2011 11:18:06 +0200
Subject: [PATCH] Fix test: use randomly created web site.

---
 bt5/networkcache_erp5/TestTemplateItem/testShaCacheExternal.py | 3 +--
 bt5/networkcache_erp5/TestTemplateItem/testShaDirExternal.py   | 3 +--
 bt5/networkcache_erp5/bt/revision                              | 2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/bt5/networkcache_erp5/TestTemplateItem/testShaCacheExternal.py b/bt5/networkcache_erp5/TestTemplateItem/testShaCacheExternal.py
index fd05f8a8e7..9774dc0b43 100644
--- a/bt5/networkcache_erp5/TestTemplateItem/testShaCacheExternal.py
+++ b/bt5/networkcache_erp5/TestTemplateItem/testShaCacheExternal.py
@@ -77,8 +77,7 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
     # HTTP Connection properties
     self.host = self.portal.REQUEST.get('SERVER_NAME')
     self.port = self.portal.REQUEST.get('SERVER_PORT')
-    web_site_path = self.portal.data_set_module.web_site_module.shacache.getPath()
-    self.path = os.path.join(web_site_path, self.key)
+    self.path = os.path.join(self.shacache.getPath(), self.key)
 
   def test_external_post(self):
     """
diff --git a/bt5/networkcache_erp5/TestTemplateItem/testShaDirExternal.py b/bt5/networkcache_erp5/TestTemplateItem/testShaDirExternal.py
index 425cd8c36e..a1770b4b3d 100644
--- a/bt5/networkcache_erp5/TestTemplateItem/testShaDirExternal.py
+++ b/bt5/networkcache_erp5/TestTemplateItem/testShaDirExternal.py
@@ -76,8 +76,7 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
     # HTTP Connection properties
     self.host = self.portal.REQUEST.get('SERVER_NAME')
     self.port = self.portal.REQUEST.get('SERVER_PORT')
-    web_site_path = self.portal.web_site_module.shadir.getPath()
-    self.path = os.path.join(web_site_path, self.key)
+    self.path = os.path.join(self.shadir.getPath(), self.key)
 
   def test_external_post(self):
     """
diff --git a/bt5/networkcache_erp5/bt/revision b/bt5/networkcache_erp5/bt/revision
index b5045cc404..8fdd954df9 100644
--- a/bt5/networkcache_erp5/bt/revision
+++ b/bt5/networkcache_erp5/bt/revision
@@ -1 +1 @@
-21
\ No newline at end of file
+22
\ No newline at end of file
-- 
2.30.9