Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed usage of several deprecated aliases in unittest.

  • Loading branch information...
commit 54afdbf37869ef27671b2ba9887043254ce82dd0 1 parent d674bd6
Alex Gaynor authored August 15, 2012 Alex Gaynor committed August 15, 2012
2  tests/modeltests/prefetch_related/tests.py
@@ -352,7 +352,7 @@ def test_foreignkey_to_inherited(self):
2  tests/regressiontests/admin_views/tests.py
@@ -2361,7 +2361,7 @@ def test_selection_counter(self):
2361 2361
     def test_popup_actions(self):
2362 2362
         """ Actions should not be shown in popups. """
2363 2363
         response = self.client.get('/test_admin/admin/admin_views/subscriber/')
2364  
-        self.assertNotEquals(response.context["action_form"], None)
  2364
+        self.assertNotEqual(response.context["action_form"], None)
2365 2365
         response = self.client.get(
2366 2366
             '/test_admin/admin/admin_views/subscriber/?%s' % IS_POPUP_VAR)
2367 2367
         self.assertEqual(response.context["action_form"], None)
4  tests/regressiontests/cache/tests.py
@@ -1513,7 +1513,7 @@ def test_middleware(self):
1513 1513
 
1514 1514
         # Repeating the request should result in a cache hit
1515 1515
         result = middleware.process_request(request)
1516  
-        self.assertNotEquals(result, None)
  1516
+        self.assertNotEqual(result, None)
1517 1517
         self.assertEqual(result.content, 'Hello World 1')
1518 1518
 
1519 1519
         # The same request through a different middleware won't hit
@@ -1522,7 +1522,7 @@ def test_middleware(self):
1522 1522
 
1523 1523
         # The same request with a timeout _will_ hit
1524 1524
         result = timeout_middleware.process_request(request)
1525  
-        self.assertNotEquals(result, None)
  1525
+        self.assertNotEqual(result, None)
1526 1526
         self.assertEqual(result.content, 'Hello World 1')
1527 1527
 
1528 1528
     @override_settings(CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True)
38  tests/regressiontests/queries/tests.py
@@ -2043,65 +2043,65 @@ def as_sql(self, qn, connection):
2043 2043
     def test_empty_full_handling_conjunction(self):
2044 2044
         qn = connection.ops.quote_name
2045 2045
         w = WhereNode(children=[EverythingNode()])
2046  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2046
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2047 2047
         w.negate()
2048 2048
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2049 2049
         w = WhereNode(children=[NothingNode()])
2050 2050
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2051 2051
         w.negate()
2052  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2052
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2053 2053
         w = WhereNode(children=[EverythingNode(), EverythingNode()])
2054  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2054
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2055 2055
         w.negate()
2056 2056
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2057 2057
         w = WhereNode(children=[EverythingNode(), self.DummyNode()])
2058  
-        self.assertEquals(w.as_sql(qn, connection), ('dummy', []))
  2058
+        self.assertEqual(w.as_sql(qn, connection), ('dummy', []))
2059 2059
         w = WhereNode(children=[self.DummyNode(), self.DummyNode()])
2060  
-        self.assertEquals(w.as_sql(qn, connection), ('(dummy AND dummy)', []))
  2060
+        self.assertEqual(w.as_sql(qn, connection), ('(dummy AND dummy)', []))
2061 2061
         w.negate()
2062  
-        self.assertEquals(w.as_sql(qn, connection), ('NOT (dummy AND dummy)', []))
  2062
+        self.assertEqual(w.as_sql(qn, connection), ('NOT (dummy AND dummy)', []))
2063 2063
         w = WhereNode(children=[NothingNode(), self.DummyNode()])
2064 2064
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2065 2065
         w.negate()
2066  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2066
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2067 2067
 
2068 2068
     def test_empty_full_handling_disjunction(self):
2069 2069
         qn = connection.ops.quote_name
2070 2070
         w = WhereNode(children=[EverythingNode()], connector='OR')
2071  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2071
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2072 2072
         w.negate()
2073 2073
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2074 2074
         w = WhereNode(children=[NothingNode()], connector='OR')
2075 2075
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2076 2076
         w.negate()
2077  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2077
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2078 2078
         w = WhereNode(children=[EverythingNode(), EverythingNode()], connector='OR')
2079  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2079
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2080 2080
         w.negate()
2081 2081
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2082 2082
         w = WhereNode(children=[EverythingNode(), self.DummyNode()], connector='OR')
2083  
-        self.assertEquals(w.as_sql(qn, connection), ('', []))
  2083
+        self.assertEqual(w.as_sql(qn, connection), ('', []))
2084 2084
         w.negate()
2085 2085
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)
2086 2086
         w = WhereNode(children=[self.DummyNode(), self.DummyNode()], connector='OR')
2087  
-        self.assertEquals(w.as_sql(qn, connection), ('(dummy OR dummy)', []))
  2087
+        self.assertEqual(w.as_sql(qn, connection), ('(dummy OR dummy)', []))
2088 2088
         w.negate()
2089  
-        self.assertEquals(w.as_sql(qn, connection), ('NOT (dummy OR dummy)', []))
  2089
+        self.assertEqual(w.as_sql(qn, connection), ('NOT (dummy OR dummy)', []))
2090 2090
         w = WhereNode(children=[NothingNode(), self.DummyNode()], connector='OR')
2091  
-        self.assertEquals(w.as_sql(qn, connection), ('dummy', []))
  2091
+        self.assertEqual(w.as_sql(qn, connection), ('dummy', []))
2092 2092
         w.negate()
2093  
-        self.assertEquals(w.as_sql(qn, connection), ('NOT (dummy)', []))
  2093
+        self.assertEqual(w.as_sql(qn, connection), ('NOT (dummy)', []))
2094 2094
 
2095 2095
     def test_empty_nodes(self):
2096 2096
         qn = connection.ops.quote_name
2097 2097
         empty_w = WhereNode()
2098 2098
         w = WhereNode(children=[empty_w, empty_w])
2099  
-        self.assertEquals(w.as_sql(qn, connection), (None, []))
  2099
+        self.assertEqual(w.as_sql(qn, connection), (None, []))
2100 2100
         w.negate()
2101  
-        self.assertEquals(w.as_sql(qn, connection), (None, []))
  2101
+        self.assertEqual(w.as_sql(qn, connection), (None, []))
2102 2102
         w.connector = 'OR'
2103  
-        self.assertEquals(w.as_sql(qn, connection), (None, []))
  2103
+        self.assertEqual(w.as_sql(qn, connection), (None, []))
2104 2104
         w.negate()
2105  
-        self.assertEquals(w.as_sql(qn, connection), (None, []))
  2105
+        self.assertEqual(w.as_sql(qn, connection), (None, []))
2106 2106
         w = WhereNode(children=[empty_w, NothingNode()], connector='OR')
2107 2107
         self.assertRaises(EmptyResultSet, w.as_sql, qn, connection)

0 notes on commit 54afdbf

Please sign in to comment.
Something went wrong with that request. Please try again.