tests.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:django-jsonfield-compat 作者: kbussell 项目源码 文件源码
def test_right_form_field_used(self):
        from jsonfield_compat.util import django_supports_native_jsonfield, is_db_postgresql

        if is_db_postgresql() and django_supports_native_jsonfield():
            from jsonfield_compat.forms import JSONFormField
            from django.contrib.postgres.fields import JSONField as _JSONFormField
            self.assertTrue(JSONFormField is _JSONFormField)
        else:
            from jsonfield_compat.forms import JSONFormField
            from jsonfield.forms import JSONFormField as _JSONFormField
            self.assertTrue(JSONFormField is _JSONFormField)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号