- Switch to pytest-django from django-nose.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:django/python-django-seed?expand=0&rev=7
This commit is contained in:
parent
cc66a8d603
commit
c1e9484817
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 14 06:22:59 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pytest-django from django-nose.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 20 08:57:06 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Thu Feb 20 08:57:06 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-django-seed
|
# spec file for package python-django-seed
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -23,7 +23,8 @@ Release: 0
|
|||||||
Summary: Django project fake data seeder
|
Summary: Django project fake data seeder
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/brobin/django-seed
|
URL: https://github.com/brobin/django-seed
|
||||||
Source: https://files.pythonhosted.org/packages/source/d/django-seed/django-seed-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/d/django-seed/django-seed-%{version}.tar.gz
|
||||||
|
Source1: settings.py
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -34,7 +35,8 @@ BuildArch: noarch
|
|||||||
BuildRequires: %{python_module Django >= 1.11}
|
BuildRequires: %{python_module Django >= 1.11}
|
||||||
BuildRequires: %{python_module Faker >= 0.7.7}
|
BuildRequires: %{python_module Faker >= 0.7.7}
|
||||||
BuildRequires: %{python_module coverage}
|
BuildRequires: %{python_module coverage}
|
||||||
BuildRequires: %{python_module django-nose}
|
BuildRequires: %{python_module pytest-django}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -44,6 +46,7 @@ A module to seed Django projects with fake data.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n django-seed-%{version}
|
%setup -q -n django-seed-%{version}
|
||||||
sed -i 's/fake-factory/Faker/' setup.py
|
sed -i 's/fake-factory/Faker/' setup.py
|
||||||
|
cp %SOURCE1 django_seed
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -53,7 +56,8 @@ sed -i 's/fake-factory/Faker/' setup.py
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%python_exec setup.py test
|
export DJANGO_SETTINGS_MODULE=django_seed.settings
|
||||||
|
%pytest %{buildroot}%{$python_sitelib}/django_seed/tests.py
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
14
settings.py
Normal file
14
settings.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
from faker import Faker
|
||||||
|
fake = Faker()
|
||||||
|
|
||||||
|
DATABASES={
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': ':memory:',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
INSTALLED_APPS=(
|
||||||
|
'django_seed',
|
||||||
|
)
|
||||||
|
SECRET_KEY=fake.sha1()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user