From 76c4aba138c0e5f78f7328b97a75d0405f19fd75 Mon Sep 17 00:00:00 2001 From: Emily O'Leary Date: Fri, 13 Sep 2013 17:11:50 -0400 Subject: [PATCH] More script cleanup --- scripts/setupTests.py | 5 ++++- scripts/update_gmg.sh | 2 ++ tests/util/collection.py | 4 ++-- tests/util/upload.py | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/setupTests.py b/scripts/setupTests.py index 7415b66..01ba0cd 100755 --- a/scripts/setupTests.py +++ b/scripts/setupTests.py @@ -40,12 +40,14 @@ if (data == None or working == None): sys.path.append(os.path.join(working,"tests")) from util import upload,collection + print data try: config = ConfigParser.ConfigParser() config.read(os.path.join(working,data)) except ConfigParser.Error as err: print(err) +print "Creating users from config file" for user in config.options("users"): ''' This loop creates new users from the config ''' newuser = config.get("users", user) @@ -56,6 +58,7 @@ for user in config.options("users"): "--username", username, "--password", password, "--email", email]) +print "Uploading media from config file" for media in config.options("media"): ''' This loop uploads media from the config ''' newmedia = config.get("media", media) @@ -65,7 +68,7 @@ for media in config.options("media"): "license": license} tUpload = upload.UploadFile() tUpload.upload(mDict) - +print "Creating collections from config file" for collectionitem in config.options("collections"): '''This loop creates collections from the config''' newcollection = config.get("collection", collectionitem) diff --git a/scripts/update_gmg.sh b/scripts/update_gmg.sh index 944d3a9..79bafea 100755 --- a/scripts/update_gmg.sh +++ b/scripts/update_gmg.sh @@ -34,6 +34,8 @@ if ! [ -d $basedir/mediagoblin/.git ] then echo "Cloning the MediaGoblin repository" git clone -q $git_uri + git submodule init + git submodule update fi cd $basedir/mediagoblin diff --git a/tests/util/collection.py b/tests/util/collection.py index 2f4347e..15ca820 100644 --- a/tests/util/collection.py +++ b/tests/util/collection.py @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' -import util +from util import login from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select @@ -36,7 +36,7 @@ class Collection(): self.accept_next_alert = True driver = self.driver - tLogin = util.login.Login() + tLogin = login.Login() tLogin.log_in(self, data) testharness = unittest.FunctionTestCase(self) diff --git a/tests/util/upload.py b/tests/util/upload.py index f3bb4a1..b62973b 100644 --- a/tests/util/upload.py +++ b/tests/util/upload.py @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ''' -import util +from util import login from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select @@ -35,7 +35,7 @@ class UploadFile(): self.accept_next_alert = True driver = self.driver - tLogin = util.login.Login() + tLogin = login.Login() testharness = unittest.FunctionTestCase(self) tLogin.log_in(self, data) -- 2.1.4