From 49c5d3cae50477681b2be23edb7ec263d45c57fb Mon Sep 17 00:00:00 2001 From: Nick Gravgaard Date: Mon, 28 Apr 2014 12:21:16 +0100 Subject: [PATCH] Rename HOST list to HOSTS I was concerned when I saw methods which are supposed to take lists of host names being passed something called HOST. This commit renames this variable to HOSTS. --- tests/core/integration/test_data_set_integration.py | 6 +++--- tests/core/integration/test_database_integration.py | 12 ++++++------ tests/core/integration/test_repository.py | 4 ++-- .../lib/test_change_buckets_to_data_sets.py | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/core/integration/test_data_set_integration.py b/tests/core/integration/test_data_set_integration.py index a3598939..463ec1df 100644 --- a/tests/core/integration/test_data_set_integration.py +++ b/tests/core/integration/test_data_set_integration.py @@ -13,7 +13,7 @@ from backdrop.read.query import Query from tests.support.test_helpers import d_tz -HOST = ['localhost'] +HOSTS = ['localhost'] PORT = 27017 DB_NAME = 'performance_platform_test' DATA_SET = 'data_set_integration_test' @@ -22,10 +22,10 @@ class TestDataSetIntegration(unittest.TestCase): def setUp(self): - self.db = database.Database(HOST, PORT, DB_NAME) + self.db = database.Database(HOSTS, PORT, DB_NAME) self.data_set = data_set.DataSet( self.db, DataSetConfig(DATA_SET, data_group="group", data_type="type", max_age_expected=1000)) - self.mongo_collection = MongoClient(HOST, PORT)[DB_NAME][DATA_SET] + self.mongo_collection = MongoClient(HOSTS, PORT)[DB_NAME][DATA_SET] def setup__timestamp_data(self): self.mongo_collection.save({ diff --git a/tests/core/integration/test_database_integration.py b/tests/core/integration/test_database_integration.py index d8ea72b5..85901bad 100644 --- a/tests/core/integration/test_database_integration.py +++ b/tests/core/integration/test_database_integration.py @@ -9,7 +9,7 @@ from backdrop.read.query import Query from tests.support.test_helpers import d, d_tz -HOST = ['localhost'] +HOSTS = ['localhost'] PORT = 27017 DB_NAME = 'performance_platform_test' DATA_SET = 'test_repository_integration' @@ -17,9 +17,9 @@ class TestMongoDriver(unittest.TestCase): def setUp(self): - self.mongo_driver = MongoDriver(MongoClient(HOST, PORT)[DB_NAME][DATA_SET]) + self.mongo_driver = MongoDriver(MongoClient(HOSTS, PORT)[DB_NAME][DATA_SET]) - self.mongo_collection = MongoClient(HOST, PORT)[DB_NAME][DATA_SET] + self.mongo_collection = MongoClient(HOSTS, PORT)[DB_NAME][DATA_SET] self.mongo_collection.drop() def test_save(self): @@ -225,10 +225,10 @@ class RepositoryIntegrationTest(unittest.TestCase): __metaclass__ = ABCMeta def setUp(self): - mongo = MongoDriver(MongoClient(HOST, PORT)[DB_NAME][DATA_SET]) + mongo = MongoDriver(MongoClient(HOSTS, PORT)[DB_NAME][DATA_SET]) self.repo = Repository(mongo) - self.mongo_collection = MongoClient(HOST, PORT)[DB_NAME][DATA_SET] + self.mongo_collection = MongoClient(HOSTS, PORT)[DB_NAME][DATA_SET] self.mongo_collection.drop() @@ -762,7 +762,7 @@ def test_query_map(self): class TestDatabase(unittest.TestCase): def setUp(self): - self.db = Database(HOST, PORT, DB_NAME) + self.db = Database(HOSTS, PORT, DB_NAME) self.db.mongo_database["my_capped_collection"].drop() def test_alive(self): diff --git a/tests/core/integration/test_repository.py b/tests/core/integration/test_repository.py index ea698cba..92df6cc4 100644 --- a/tests/core/integration/test_repository.py +++ b/tests/core/integration/test_repository.py @@ -3,14 +3,14 @@ from backdrop.core.repository import UserConfigRepository from backdrop.core.user import UserConfig -HOST = ['localhost'] +HOSTS = ['localhost'] PORT = 27017 DB_NAME = 'performance_platform_test' class TestUserRepositoryIntegration(object): def setUp(self): - self.db = Database(HOST, PORT, DB_NAME) + self.db = Database(HOSTS, PORT, DB_NAME) self.db._mongo.drop_database(DB_NAME) self.mongo_collection = self.db.get_collection("users")._collection self.mongo_collection.drop() diff --git a/tests/migrations/lib/test_change_buckets_to_data_sets.py b/tests/migrations/lib/test_change_buckets_to_data_sets.py index 9b99c57b..a88b60c8 100644 --- a/tests/migrations/lib/test_change_buckets_to_data_sets.py +++ b/tests/migrations/lib/test_change_buckets_to_data_sets.py @@ -6,7 +6,7 @@ from backdrop.core.data_set import DataSetConfig from migrations.lib.change_buckets_to_data_sets import up -HOST = ['localhost'] +HOSTS = ['localhost'] PORT = 27017 DB_NAME = 'backdrop' DATA_SET = 'users' @@ -14,10 +14,10 @@ class ChangeBucketsToDataSetTestCase(unittest.TestCase): def setUp(self): - self.db = database.Database(HOST, PORT, DB_NAME) + self.db = database.Database(HOSTS, PORT, DB_NAME) self.data_set = data_set.DataSet( self.db, DataSetConfig(DATA_SET, data_group="group", data_type="type", max_age_expected=1000)) - self.mongo_collection = MongoClient(HOST, PORT)[DB_NAME][DATA_SET] + self.mongo_collection = MongoClient(HOSTS, PORT)[DB_NAME][DATA_SET] self.mongo_collection.drop() self.data_sets = [ "carers_allowance_weekly_claims",