Accepting request 976587 from devel:languages:python:django
OBS-URL: https://build.opensuse.org/request/show/976587 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-graphene-django?expand=0&rev=6
This commit is contained in:
commit
2c2821fe20
48
python-graphene-django-no-mock.patch
Normal file
48
python-graphene-django-no-mock.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
diff -upr graphene-django-3.0.0b7.orig/graphene_django/tests/test_command.py graphene-django-3.0.0b7/graphene_django/tests/test_command.py
|
||||||
|
--- graphene-django-3.0.0b7.orig/graphene_django/tests/test_command.py 2022-05-12 12:06:48.134471409 +0200
|
||||||
|
+++ graphene-django-3.0.0b7/graphene_django/tests/test_command.py 2022-05-12 12:06:48.150471511 +0200
|
||||||
|
@@ -2,7 +2,7 @@ from textwrap import dedent
|
||||||
|
|
||||||
|
from django.core import management
|
||||||
|
from io import StringIO
|
||||||
|
-from mock import mock_open, patch
|
||||||
|
+from unittest.mock import mock_open, patch
|
||||||
|
|
||||||
|
from graphene import ObjectType, Schema, String
|
||||||
|
|
||||||
|
diff -upr graphene-django-3.0.0b7.orig/graphene_django/tests/test_types.py graphene-django-3.0.0b7/graphene_django/tests/test_types.py
|
||||||
|
--- graphene-django-3.0.0b7.orig/graphene_django/tests/test_types.py 2022-05-12 12:06:48.134471409 +0200
|
||||||
|
+++ graphene-django-3.0.0b7/graphene_django/tests/test_types.py 2022-05-12 12:06:48.150471511 +0200
|
||||||
|
@@ -3,7 +3,7 @@ from textwrap import dedent
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from django.db import models
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from graphene import Connection, Field, Interface, ObjectType, Schema, String
|
||||||
|
from graphene.relay import Node
|
||||||
|
diff -upr graphene-django-3.0.0b7.orig/graphene_django/tests/test_utils.py graphene-django-3.0.0b7/graphene_django/tests/test_utils.py
|
||||||
|
--- graphene-django-3.0.0b7.orig/graphene_django/tests/test_utils.py 2022-05-12 12:06:48.134471409 +0200
|
||||||
|
+++ graphene-django-3.0.0b7/graphene_django/tests/test_utils.py 2022-05-12 12:06:48.150471511 +0200
|
||||||
|
@@ -2,7 +2,7 @@ import json
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from django.utils.translation import gettext_lazy
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from ..utils import camelize, get_model_fields, GraphQLTestCase
|
||||||
|
from .models import Film, Reporter
|
||||||
|
diff -upr graphene-django-3.0.0b7.orig/graphene_django/tests/test_views.py graphene-django-3.0.0b7/graphene_django/tests/test_views.py
|
||||||
|
--- graphene-django-3.0.0b7.orig/graphene_django/tests/test_views.py 2022-05-12 12:06:48.134471409 +0200
|
||||||
|
+++ graphene-django-3.0.0b7/graphene_django/tests/test_views.py 2022-05-12 12:06:48.150471511 +0200
|
||||||
|
@@ -2,7 +2,7 @@ import json
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from django.db import connection
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 12 10:10:00 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- do not require python-mock for build
|
||||||
|
- added patches
|
||||||
|
fix https://github.com/graphql-python/graphene-django/issues/1321
|
||||||
|
+ python-graphene-django-no-mock.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 11 10:45:59 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
Tue Jan 11 10:45:59 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@ License: MIT
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: https://github.com/graphql-python/graphene-django
|
URL: https://github.com/graphql-python/graphene-django
|
||||||
Source: https://github.com/graphql-python/graphene-django/archive/v%{version}.tar.gz#/graphene-django-%{version}.tar.gz
|
Source: https://github.com/graphql-python/graphene-django/archive/v%{version}.tar.gz#/graphene-django-%{version}.tar.gz
|
||||||
|
# https://github.com/graphql-python/graphene-django/issues/1321
|
||||||
|
Patch0: python-graphene-django-no-mock.patch
|
||||||
BuildRequires: %{python_module django-codemod}
|
BuildRequires: %{python_module django-codemod}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -48,7 +50,6 @@ BuildRequires: %{python_module djangorestframework >= 3.6.3}
|
|||||||
BuildRequires: %{python_module graphene >= 2.9.9}
|
BuildRequires: %{python_module graphene >= 2.9.9}
|
||||||
BuildRequires: %{python_module graphql-core >= 3.1.0}
|
BuildRequires: %{python_module graphql-core >= 3.1.0}
|
||||||
BuildRequires: %{python_module graphql-relay}
|
BuildRequires: %{python_module graphql-relay}
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module promise >= 2.1}
|
BuildRequires: %{python_module promise >= 2.1}
|
||||||
BuildRequires: %{python_module psycopg2}
|
BuildRequires: %{python_module psycopg2}
|
||||||
BuildRequires: %{python_module pytest-django >= 3.3.2}
|
BuildRequires: %{python_module pytest-django >= 3.3.2}
|
||||||
@ -62,6 +63,7 @@ Graphene Django integration.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n graphene-django-%{version}
|
%setup -q -n graphene-django-%{version}
|
||||||
|
%patch0 -p1
|
||||||
rm setup.cfg
|
rm setup.cfg
|
||||||
sed -i '/pytest-runner/d' setup.py
|
sed -i '/pytest-runner/d' setup.py
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user