Ai
1 Star 0 Fork 8

numzone/python-django

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
disable-test-custom-fields.patch 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
nilusyi 提交于 2023-05-26 15:15 +08:00 . OCS package init
diff -Naur django-2.2.28.orig/tests/inspectdb/tests.py django-2.2.28/tests/inspectdb/tests.py
--- django-2.2.28.orig/tests/inspectdb/tests.py 2023-04-23 12:55:43.674836361 +0800
+++ django-2.2.28/tests/inspectdb/tests.py 2023-04-23 12:59:24.888765076 +0800
@@ -249,26 +249,6 @@
with connection.cursor() as c:
c.execute('DROP INDEX Findex')
- @skipUnless(connection.vendor == 'sqlite',
- "Only patched sqlite's DatabaseIntrospection.data_types_reverse for this test")
- def test_custom_fields(self):
- """
- Introspection of columns with a custom field (#21090)
- """
- out = StringIO()
- orig_data_types_reverse = connection.introspection.data_types_reverse
- try:
- connection.introspection.data_types_reverse = {
- 'text': 'myfields.TextField',
- 'bigint': 'BigIntegerField',
- }
- call_command('inspectdb', 'inspectdb_columntypes', stdout=out)
- output = out.getvalue()
- self.assertIn("text_field = myfields.TextField()", output)
- self.assertIn("big_int_field = models.BigIntegerField()", output)
- finally:
- connection.introspection.data_types_reverse = orig_data_types_reverse
-
def test_introspection_errors(self):
"""
Introspection errors should not crash the command, and the error should
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/numzone/python-django.git
git@gitee.com:numzone/python-django.git
numzone
python-django
python-django
master

搜索帮助