File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
import sys
3
- from django import VERSION
3
+ import django
4
4
from django .db import connection
5
5
import typing as t
6
6
from django .test import TestCase
@@ -44,11 +44,14 @@ def test(self):
44
44
f"{ expected_python } "
45
45
)
46
46
47
- expected_django = tuple (int (v ) for v in expected_django .split ("." ) if v )
48
- assert VERSION [: len (expected_django )] == expected_django , (
49
- f"Django Version Mismatch: { VERSION [: len (expected_django )]} != "
50
- f"{ expected_django } "
51
- )
47
+ try :
48
+ expected_django = tuple (int (v ) for v in expected_django .split ("." ) if v )
49
+ assert django .VERSION [: len (expected_django )] == expected_django , (
50
+ f"Django Version Mismatch: { django .VERSION [: len (expected_django )]} != "
51
+ f"{ expected_django } "
52
+ )
53
+ except ValueError :
54
+ assert expected_django == django .__version__
52
55
53
56
if expected_db_ver :
54
57
if rdbms == "postgres" :
You can’t perform that action at this time.
0 commit comments