Commits

Anonymous committed 70f49a8

connect using Remote if not running on Windows

Comments (0)

Files changed (2)

tests/dbsettings.py

         'USER': DATABASE_USER,
         'PASSWORD': DATABASE_PASSWORD,
         'COMMAND_TIMEOUT': DATABASE_COMMAND_TIMEOUT,
-        'OPTIONS' : {
-            'provider' : 'SQLOLEDB.1'
-            ##'provider': 'SQLNCLI10',
-            ##'extra_params': 'DataTypeCompatibility=80;MARS Connection=True;',
-        },
-    }
+    }   # note: using default provider and options
 }
 
-if True:###os.sep != '\\': # NOT running on Windows .. set up remote
-    DATABASES['default']['OPTIONS']['proxy_host'] = '192.168.200.20'
+if os.sep != '\\': # NOT running on Windows .. set up remote
+    DATABASES['default']['OPTIONS'] = {'proxy_host' : '192.168.200.20'}
     DATABASES['default']['NAME'] = 'django_remote_test'
 
 # Adds the relative path for the MS SQL Server backend to Python's import path.

tests/test_main/apitest/tests.py

     driver = Database
     connect_args = ()
     connect_kw_args = base.connection_dict_from_settings()
+    if 'proxy_host' in connect_kw_args:
+        import adodbapi.remote
+        driver = adodbapi.remote
     try:
         dbapi20.test_connect() # see if the original database name works
     except: