diff --git a/django-2.2.patch b/django-2.2.patch new file mode 100644 index 0000000..2d8b19f --- /dev/null +++ b/django-2.2.patch @@ -0,0 +1,22 @@ +From a4c30d6529d3e613f5c2ac4cced7f985fda21041 Mon Sep 17 00:00:00 2001 +From: Federico Bond +Date: Tue, 2 Apr 2019 14:02:00 -0300 +Subject: [PATCH] Fix test for Django 2.2 + +--- + tests/test_django.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/test_django.py b/tests/test_django.py +index 9a7827c..32b0539 100644 +--- a/tests/test_django.py ++++ b/tests/test_django.py +@@ -137,6 +137,8 @@ class Meta: + + + class ModelTests(django_test.TestCase): ++ databases = {'default', 'replica'} ++ + def test_unset_model(self): + class UnsetModelFactory(factory.django.DjangoModelFactory): + pass diff --git a/python-factory_boy.changes b/python-factory_boy.changes index 627eb24..7648dfb 100644 --- a/python-factory_boy.changes +++ b/python-factory_boy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 17 10:14:58 UTC 2019 - Tomáš Chvátal + +- Add patch to support django 2.2: + * django-2.2.patch + ------------------------------------------------------------------- Thu Oct 18 09:40:04 UTC 2018 - Tomáš Chvátal diff --git a/python-factory_boy.spec b/python-factory_boy.spec index 94982ee..db39e21 100644 --- a/python-factory_boy.spec +++ b/python-factory_boy.spec @@ -1,7 +1,7 @@ # # spec file for package python-factory_boy # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,6 +26,7 @@ Group: Development/Languages/Python URL: http://github.com/rbarrois/factory_boy Source: https://github.com/FactoryBoy/factory_boy/archive/%{version}.tar.gz Patch0: python37.patch +Patch1: django-2.2.patch BuildRequires: %{python_module Django} BuildRequires: %{python_module Faker >= 0.7.0} BuildRequires: %{python_module Pillow} @@ -45,6 +46,7 @@ A test fixtures replacement based on thoughtbot's factory_girl for Ruby. %prep %setup -q -n factory_boy-%{version} %patch0 -p1 +%patch1 -p1 # needs running mongo rm tests/test_mongoengine.py sed -i -e '/test_mongoengine/d' tests/__init__.py