Beispiel #1
0
 def test_auto_is_null_auto_config(self):
     query = 'set sql_auto_is_null = 0'
     connection.init_connection_state()
     last_query = connection.queries[-1]['sql'].lower()
     if connection.features.is_sql_auto_is_null_enabled:
         self.assertIn(query, last_query)
     else:
         self.assertNotIn(query, last_query)
Beispiel #2
0
 def test_auto_is_null_auto_config(self):
     query = 'set sql_auto_is_null = 0'
     connection.init_connection_state()
     last_query = connection.queries[-1]['sql'].lower()
     if connection.features.is_sql_auto_is_null_enabled:
         self.assertIn(query, last_query)
     else:
         self.assertNotIn(query, last_query)
Beispiel #3
0
 def test_auto_is_null_auto_config(self):
     query = "set sql_auto_is_null = 0"
     connection.init_connection_state()
     last_query = connection.queries[-1]['sql'].lower()
     if connection.features.can_return_last_inserted_id_with_auto_is_null:
         self.assertIn(query, last_query)
     else:
         self.assertNotIn(query, last_query)
Beispiel #4
0
 def test_timezone_none_use_tz_false(self):
     connection.ensure_connection()
     with self.settings(TIME_ZONE=None, USE_TZ=False):
         connection.init_connection_state()
Beispiel #5
0
 def test_timezone_none_use_tz_false(self):
     connection.ensure_connection()
     with self.settings(TIME_ZONE=None, USE_TZ=False):
         connection.init_connection_state()