============================= django-remote-scenario =============================
.. image:: https://badge.fury.io/py/django-remote-scenario.png :target: https://badge.fury.io/py/django-remote-scenario
.. image:: https://travis-ci.org/skalanux/django-remote-scenario.png?branch=master :target: https://travis-ci.org/skalanux/django-remote-scenario
.. image:: https://coveralls.io/repos/skalanux/django-remote-scenario/badge.png?branch=master :target: https://coveralls.io/r/skalanux/django-remote-scenario?branch=master
Remote scenario setup for e2e testing of django projects
The full documentation will be at https://django-remote-scenario.readthedocs.org.
Install django-remote-scenario::
pip install django-remote-scenario
Then add it to an existing django project::
INSTALLED_APPS = [
...
django_rs
Inside your settings file you also need to add the following::
SETTINGS_FILE_PATH = __file__
You need to add django_rs urls to your project url file like this::
urlpatterns = patterns('',
...
url(r'^drs/', include('django_rs.urls')),
..
)
To create custom scenarios, just create a directory inside your app named "scenarios" , then add as many files as scenarios you want to implement and create a init.py so it becomes a module . Inside each of those files, you need to implement a main() function setting up the models you want to create for the scenario, you could create them by hand or use something like django_dynamic_fixtures https://github.com/paulocheque/django-dynamic-fixture
Once everything is ready, start the server this way, this will enable the dynamic call of scenarios::
python manage.py rune2eserver initial_data.json
Note: You need to pass a initial fixture file with the barebones of your data.
it is also possible (but not mandatory) to pass a specific settings file, for testing purposes, in case you want to do the tests using a different database for example::
python manage.py rune2eserver initial_data.json --settings=demoproject.test_settings [fixture1 fixture2....] [--addrport ipaddress:port]
You might also use you existing database to load scenarios on top of it with the "--skip-test-db" or "-t" modifier::
python manage.py rune2eserver -t initial_data.json
To start using it, just go to the following url::
http://127.0.0.1:8000/drs/[APPLICATION]/[SCENARIO]
after doing that the database will be populated with the data you provided in your scenario. Take into account that, everytime you call an scenario, all the other data in the database is erased, except for the one in your initial_data fixture files, wich are loaded again, and also the one you pass as a parameter when you call the command.
Inside this repository you will find a demo Django project preconfigured with a simple scenario that sets up four objects. Use it like this:
First run the server::
$ python manage.py rune2eserver initial_data.json --settings=demoproject.test_settings
Then go to your browser and setup a scenario::
http://127.0.0.1:8000/drs/demoapp/scenario_1
You may also pass a parameter to avoid flushing the database on a specific call::
http://127.0.0.1:8000/drs/demoapp/scenario_1/?flush=0
Later you could see the results on the following url::
http://127.0.0.1:8000/demoapp/
It is possible to mock parts of your backend between scenarios calls. You need to add a new directory inside the scenarios directory and name ir 'mocks', then, again, add as many mocks as you want to implement and create a init.py so it becomes a module . Inside each of those files. You can apply as many mocks as you want and deactivate them selectibly. Pay special atention to the order this mocks are applied, as it may affect their internal behaviour.
To apply a mock just go to the following URL (assumming a file named mock_1 inside demoapp/mocks ::
http://127.0.0.1:8000/drs/demoapp/mocks/mock_1?activate=1
To remove the mock::
http://127.0.0.1:8000/drs/demoapp/mocks/mock_1?activate=0
An example of a mock can be found inside the test application
Experimental scenario and mocking browseable interface could be used to apply mocks and load scenarios by visting the root url for drs (on this case /drs/) ::
http://127.0.0.1:8000/drs/
Bumps wheel from 0.23.0 to 0.38.1.
Sourced from wheel's changelog.
Release Notes
UNRELEASED
- Updated vendored
packaging
to 22.00.38.4 (2022-11-09)
- Fixed
PKG-INFO
conversion inbdist_wheel
mangling UTF-8 header values inMETADATA
(PR by Anderson Bravalheri)0.38.3 (2022-11-08)
- Fixed install failure when used with
--no-binary
, reported on Ubuntu 20.04, by removingsetup_requires
fromsetup.cfg
0.38.2 (2022-11-05)
- Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags
0.38.1 (2022-11-04)
- Removed install dependency on setuptools
- The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.
0.38.0 (2022-10-21)
- Dropped support for Python < 3.7
- Updated vendored
packaging
to 21.3- Replaced all uses of
distutils
withsetuptools
- The handling of
license_files
(including glob patterns and default values) is now delegated tosetuptools>=57.0.0
(#466). The package dependencies were updated to reflect this change.- Fixed potential DoS attack via the
WHEEL_INFO_RE
regular expression- Fixed
ValueError: ZIP does not support timestamps before 1980
when usingSOURCE_DATE_EPOCH=0
or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.0.37.1 (2021-12-22)
- Fixed
wheel pack
duplicating theWHEEL
contents when the build number has changed (#415)- Fixed parsing of file names containing commas in
RECORD
(PR by Hood Chatham)0.37.0 (2021-08-09)
- Added official Python 3.10 support
- Updated vendored
packaging
library to v20.9
... (truncated)
6f1608d
Created a new releasecf8f5ef
Moved news item from PR #484 to its proper place9ec2016
Removed install dependency on setuptools (#483)747e1f6
Fixed PyPy SOABI parsing (#484)7627548
[pre-commit.ci] pre-commit autoupdate (#480)7b9e8e1
Test on Python 3.11 finala04dfef
Updated the pypi-publish action94bb62c
Fixed docs not building due to code style changesd635664
Updated the codecov action to the latest versionfcb94cd
Updated version to match the releaseDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps wheel from 0.23.0 to 0.38.1.
Sourced from wheel's changelog.
Release Notes
UNRELEASED
- Updated vendored
packaging
to 22.00.38.4 (2022-11-09)
- Fixed
PKG-INFO
conversion inbdist_wheel
mangling UTF-8 header values inMETADATA
(PR by Anderson Bravalheri)0.38.3 (2022-11-08)
- Fixed install failure when used with
--no-binary
, reported on Ubuntu 20.04, by removingsetup_requires
fromsetup.cfg
0.38.2 (2022-11-05)
- Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags
0.38.1 (2022-11-04)
- Removed install dependency on setuptools
- The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.
0.38.0 (2022-10-21)
- Dropped support for Python < 3.7
- Updated vendored
packaging
to 21.3- Replaced all uses of
distutils
withsetuptools
- The handling of
license_files
(including glob patterns and default values) is now delegated tosetuptools>=57.0.0
(#466). The package dependencies were updated to reflect this change.- Fixed potential DoS attack via the
WHEEL_INFO_RE
regular expression- Fixed
ValueError: ZIP does not support timestamps before 1980
when usingSOURCE_DATE_EPOCH=0
or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.0.37.1 (2021-12-22)
- Fixed
wheel pack
duplicating theWHEEL
contents when the build number has changed (#415)- Fixed parsing of file names containing commas in
RECORD
(PR by Hood Chatham)0.37.0 (2021-08-09)
- Added official Python 3.10 support
- Updated vendored
packaging
library to v20.9
... (truncated)
6f1608d
Created a new releasecf8f5ef
Moved news item from PR #484 to its proper place9ec2016
Removed install dependency on setuptools (#483)747e1f6
Fixed PyPy SOABI parsing (#484)7627548
[pre-commit.ci] pre-commit autoupdate (#480)7b9e8e1
Test on Python 3.11 finala04dfef
Updated the pypi-publish action94bb62c
Fixed docs not building due to code style changesd635664
Updated the codecov action to the latest versionfcb94cd
Updated version to match the releaseDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps mako from 0.5.0 to 1.2.2.
Sourced from mako's releases.
1.2.2
Released: Mon Aug 29 2022
bug
[bug] [lexer] Fixed issue in lexer where the regexp used to match tags would not correctly interpret quoted sections individually. While this parsing issue still produced the same expected tag structure later on, the mis-handling of quoted sections was also subject to a regexp crash if a tag had a large number of quotes within its quoted sections.
References: #366
1.2.1
Released: Thu Jun 30 2022
bug
[bug] [tests] Various fixes to the test suite in the area of exception message rendering to accommodate for variability in Python versions as well as Pygments.
References: #360
misc
[performance] Optimized some codepaths within the lexer/Python code generation process, improving performance for generation of templates prior to their being cached. Pull request courtesy Takuto Ikuta.
References: #361
1.2.0
Released: Thu Mar 10 2022
changed
[changed] [py3k] Corrected "universal wheel" directive in
setup.cfg
so that building a wheel does not target Python 2.References: #351
[changed] [py3k] The
bytestring_passthrough
template argument is removed, as this flag only applied to Python 2.
... (truncated)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps lxml from 2.3.2 to 4.9.1.
Sourced from lxml's changelog.
4.9.1 (2022-07-01)
Bugs fixed
- A crash was resolved when using
iterwalk()
(orcanonicalize()
) after parsing certain incorrect input. Note thatiterwalk()
can crash on valid input parsed with the same parser after failing to parse the incorrect input.4.9.0 (2022-06-01)
Bugs fixed
- GH#341: The mixin inheritance order in
lxml.html
was corrected. Patch by xmo-odoo.Other changes
Built with Cython 0.29.30 to adapt to changes in Python 3.11 and 3.12.
Wheels include zlib 1.2.12, libxml2 2.9.14 and libxslt 1.1.35 (libxml2 2.9.12+ and libxslt 1.1.34 on Windows).
GH#343: Windows-AArch64 build support in Visual Studio. Patch by Steve Dower.
4.8.0 (2022-02-17)
Features added
GH#337: Path-like objects are now supported throughout the API instead of just strings. Patch by Henning Janssen.
The
ElementMaker
now supportsQName
values as tags, which always override the default namespace of the factory.Bugs fixed
- GH#338: In lxml.objectify, the XSI float annotation "nan" and "inf" were spelled in lower case, whereas XML Schema datatypes define them as "NaN" and "INF" respectively.
... (truncated)
d01872c
Prevent parse failure in new test from leaking into later test runs.d65e632
Prepare release of lxml 4.9.1.86368e9
Fix a crash when incorrect parser input occurs together with usages of iterwa...50c2764
Delete unused Travis CI config and reference in docs (GH-345)8f0bf2d
Try to speed up the musllinux AArch64 build by splitting the different CPytho...b9f7074
Remove debug print from test.b224e0f
Try to install 'xz' in wheel builds, if available, since it's now needed to e...897ebfa
Update macOS deployment target version from 10.14 to 10.15 since 10.14 starts...853c9e9
Prepare release of 4.9.0.d3f77e6
Add a test for https://bugs.launchpad.net/lxml/+bug/1965070 leaving out the a...Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps supervisor from 3.0a8 to 3.0.1.
Sourced from supervisor's changelog.
3.0.1 (2017-07-24)
- Backported from Supervisor 3.3.3: Fixed CVE-2017-11610. A vulnerability was found where an authenticated client can send a malicious XML-RPC request to
supervisord
that will run arbitrary shell commands on the server. The commands will be run as the same user assupervisord
. Depending on howsupervisord
has been configured, this may be root. See Supervisor/supervisor#964 for details.3.0 (2013-07-30)
Parsing the config file will now fail with an error message if a process or group name contains characters that are not compatible with the eventlistener protocol.
Fixed a bug where the
tail -f
command insupervisorctl
would fail if the combined length of the username and password was over 56 characters.Reading the config file now gives a separate error message when the config file exists but can't be read. Previously, any error reading the file would be reported as "could not find config file". Patch by Jens Rantil.
Fixed an XML-RPC bug where array elements after the first would be ignored when using the ElementTree-based XML parser. Patch by Zev Benjamin.
Fixed the usage message output by
supervisorctl
to show the correct default config file path. Patch by Alek Storm.3.0b2 (2013-05-28)
The behavior of the program option
user
has changed. In all previous versions, ifsupervisord
failed to switch to the user, a warning would be sent to the stderr log but the child process would still be spawned. This means that a mistake in the config file could result in a child process being unintentionally spawned as root. Now,supervisord
will not spawn the child unless it was able to successfully switch to the user. Thanks to Igor Partola for reporting this issue.If a user specified in the config file does not exist on the system,
supervisord
will now print an error and refuse to start.Reverted a change to logging introduced in 3.0b1 that was intended to allow multiple processes to log to the same file with the rotating log handler. The implementation caused supervisord to crash during reload and to leak file handles. Also, since log rotation options are given on a per-program basis, impossible configurations could be created (conflicting rotation options for the same file). Given this and that supervisord now has syslog
... (truncated)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Bumps reportlab from 2.5 to 3.5.55.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.