summaryrefslogtreecommitdiff
path: root/tests/multiple_database
diff options
context:
space:
mode:
authorFlavio Curella <flavio.curella@gmail.com>2014-05-20 11:24:23 -0500
committerFlavio Curella <flavio.curella@gmail.com>2014-05-20 11:35:16 -0500
commit73a57b06f9d8c963b9be2bdb83122a004a4a8b0b (patch)
treeb3b7c59636555bd6c521ca793fd08db39a858da5 /tests/multiple_database
parenta5f6cbce07b5f3ab48d931e3fd1883c757fb9b45 (diff)
downloaddjango-73a57b06f9d8c963b9be2bdb83122a004a4a8b0b.tar.gz
replaced occurrences of master/slave terminology with leader/follower
Diffstat (limited to 'tests/multiple_database')
-rw-r--r--tests/multiple_database/routers.py2
-rw-r--r--tests/multiple_database/tests.py38
2 files changed, 20 insertions, 20 deletions
diff --git a/tests/multiple_database/routers.py b/tests/multiple_database/routers.py
index 8a84e0b3d2..23da8df199 100644
--- a/tests/multiple_database/routers.py
+++ b/tests/multiple_database/routers.py
@@ -4,7 +4,7 @@ from django.db import DEFAULT_DB_ALIAS
class TestRouter(object):
- # A test router. The behavior is vaguely master/slave, but the
+ # A test router. The behavior is vaguely leader/follower, but the
# databases aren't assumed to propagate changes.
def db_for_read(self, model, instance=None, **hints):
if instance:
diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py
index 01c6e1ef15..2e8b902fea 100644
--- a/tests/multiple_database/tests.py
+++ b/tests/multiple_database/tests.py
@@ -854,7 +854,7 @@ class QueryTestCase(TestCase):
self.assertEqual(book.editor._state.db, 'other')
def test_subquery(self):
- """Make sure as_sql works with subqueries and master/slave."""
+ """Make sure as_sql works with subqueries and leader/follower."""
sub = Person.objects.using('other').filter(name='fff')
qs = Book.objects.filter(editor__in=sub)
@@ -919,7 +919,7 @@ class RouterTestCase(TestCase):
multi_db = True
def setUp(self):
- # Make the 'other' database appear to be a slave of the 'default'
+ # Make the 'other' database appear to be a follower of the 'default'
self.old_routers = router.routers
router.routers = [TestRouter()]
@@ -1071,7 +1071,7 @@ class RouterTestCase(TestCase):
try:
dive.editor = marty
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments of original objects haven't changed...
self.assertEqual(marty._state.db, 'default')
@@ -1089,7 +1089,7 @@ class RouterTestCase(TestCase):
except Book.DoesNotExist:
self.fail('Source database should have a copy of saved object')
- # This isn't a real master-slave database, so restore the original from other
+ # This isn't a real leader-follower database, so restore the original from other
dive = Book.objects.using('other').get(title='Dive into Python')
self.assertEqual(dive._state.db, 'other')
@@ -1097,7 +1097,7 @@ class RouterTestCase(TestCase):
try:
marty.edited = [pro, dive]
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Assignment implies a save, so database assignments of original objects have changed...
self.assertEqual(marty._state.db, 'default')
@@ -1111,7 +1111,7 @@ class RouterTestCase(TestCase):
except Book.DoesNotExist:
self.fail('Source database should have a copy of saved object')
- # This isn't a real master-slave database, so restore the original from other
+ # This isn't a real leader-follower database, so restore the original from other
dive = Book.objects.using('other').get(title='Dive into Python')
self.assertEqual(dive._state.db, 'other')
@@ -1119,7 +1119,7 @@ class RouterTestCase(TestCase):
try:
marty.edited.add(dive)
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Add implies a save, so database assignments of original objects have changed...
self.assertEqual(marty._state.db, 'default')
@@ -1133,7 +1133,7 @@ class RouterTestCase(TestCase):
except Book.DoesNotExist:
self.fail('Source database should have a copy of saved object')
- # This isn't a real master-slave database, so restore the original from other
+ # This isn't a real leader-follower database, so restore the original from other
dive = Book.objects.using('other').get(title='Dive into Python')
# If you assign a FK object when the base object hasn't
@@ -1196,7 +1196,7 @@ class RouterTestCase(TestCase):
mark = Person.objects.using('default').create(pk=2, name="Mark Pilgrim")
# Now save back onto the usual database.
- # This simulates master/slave - the objects exist on both database,
+ # This simulates leader/follower - the objects exist on both database,
# but the _state.db is as it is for all other tests.
pro.save(using='default')
marty.save(using='default')
@@ -1213,7 +1213,7 @@ class RouterTestCase(TestCase):
try:
marty.book_set = [pro, dive]
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments don't change
self.assertEqual(marty._state.db, 'default')
@@ -1232,7 +1232,7 @@ class RouterTestCase(TestCase):
try:
marty.book_set.add(dive)
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments don't change
self.assertEqual(marty._state.db, 'default')
@@ -1251,7 +1251,7 @@ class RouterTestCase(TestCase):
try:
dive.authors = [mark, marty]
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments don't change
self.assertEqual(marty._state.db, 'default')
@@ -1273,7 +1273,7 @@ class RouterTestCase(TestCase):
try:
dive.authors.add(marty)
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments don't change
self.assertEqual(marty._state.db, 'default')
@@ -1311,7 +1311,7 @@ class RouterTestCase(TestCase):
try:
bob.userprofile = alice_profile
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments of original objects haven't changed...
self.assertEqual(alice._state.db, 'default')
@@ -1342,7 +1342,7 @@ class RouterTestCase(TestCase):
try:
review1.content_object = dive
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments of original objects haven't changed...
self.assertEqual(pro._state.db, 'default')
@@ -1361,7 +1361,7 @@ class RouterTestCase(TestCase):
except Book.DoesNotExist:
self.fail('Source database should have a copy of saved object')
- # This isn't a real master-slave database, so restore the original from other
+ # This isn't a real leader-follower database, so restore the original from other
dive = Book.objects.using('other').get(title='Dive into Python')
self.assertEqual(dive._state.db, 'other')
@@ -1369,7 +1369,7 @@ class RouterTestCase(TestCase):
try:
dive.reviews.add(review1)
except ValueError:
- self.fail("Assignment across master/slave databases with a common source should be ok")
+ self.fail("Assignment across leader/follower databases with a common source should be ok")
# Database assignments of original objects haven't changed...
self.assertEqual(pro._state.db, 'default')
@@ -1444,7 +1444,7 @@ class RouterTestCase(TestCase):
self.assertEqual(pro.reviews.db_manager('default').all().db, 'default')
def test_subquery(self):
- """Make sure as_sql works with subqueries and master/slave."""
+ """Make sure as_sql works with subqueries and leader/follower."""
# Create a book and author on the other database
mark = Person.objects.using('other').create(name="Mark Pilgrim")
@@ -1482,7 +1482,7 @@ class AuthTestCase(TestCase):
multi_db = True
def setUp(self):
- # Make the 'other' database appear to be a slave of the 'default'
+ # Make the 'other' database appear to be a follower of the 'default'
self.old_routers = router.routers
router.routers = [AuthRouter()]