File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -357,31 +357,6 @@ jobs:
357357 grep -A 10 -B 2 "PASSWORD" testapp/settings.py
358358 displayName: Verify PASSWORD replacement
359359
360- - script : |
361- echo "Testing Django database connection..."
362- python -c "
363- import os
364- import sys
365- import django
366- from django.conf import settings
367- from django.db import connection
368-
369- # Add testapp to Python path
370- sys.path.insert(0, '/mnt/vss/_work/1/s')
371- os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'testapp.settings')
372- django.setup()
373-
374- try :
375- with connection.cursor() as cursor :
376- cursor.execute('SELECT 1')
377- result = cursor.fetchone()
378- print(f'Database connection successful : {result}')
379- except Exception as e :
380- print(f'Database connection failed : {e}')
381- sys.exit(1)
382- "
383- displayName: Test database connection
384-
385360 - script : tox -e $(tox.env)
386361 displayName : Run tox
387362
You can’t perform that action at this time.
0 commit comments