ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

Testcase for Django Version x.x #71

Closed dkdndes closed 2 years ago

dkdndes commented 2 years ago

Django has by now Version 4.0, could you provide a test case for the DB2 connection, which checks the version or tell me how to check it?

praveen-db2 commented 2 years ago

@dkdndes you can use below statement in any test case, from django import VERSION as djangoVersion

Value in object djangoVersion will be like, Ex: (3, 2, 11, 'alpha', 0) You can use this object directly in your work.

Otherwise you can also use below code ex:

    from django import get_version
    from django import VERSION as djangoVersion
    def test_development(self):        
        ver_string = get_version(djangoVersion)
praveen-db2 commented 2 years ago

@dkdndes can we close this issue ? Did my sample code help you ?

dkdndes commented 2 years ago

Thank you @praveen-db2