Commit Graph

53 Commits

Author SHA1 Message Date
Katie Smith
a85f5d3acf Merge pull request #1741 from alphagov/pyup-update-freezegun-0.3.9-to-0.3.10
Update freezegun to 0.3.10
2018-03-07 11:11:30 +00:00
pyup-bot
3a9e390902 Update freezegun from 0.3.9 to 0.3.10 2018-03-06 03:11:22 +00:00
pyup-bot
acd6b0c05b Update pytest from 3.4.1 to 3.4.2 2018-03-06 00:07:20 +00:00
Chris Hill-Scott
98d5408d7d Merge pull request #1727 from alphagov/pyup-update-pytest-mock-1.7.0-to-1.7.1
Update pytest-mock to 1.7.1
2018-03-05 14:52:15 +00:00
pyup-bot
5e44449e66 Update coveralls from 1.2.0 to 1.3.0 2018-03-03 00:00:41 +00:00
pyup-bot
d0ed3bcacc Update pytest-mock from 1.7.0 to 1.7.1 2018-03-01 11:11:18 +00:00
Leo Hemsted
ab95a4501b bump requirements
notably, remove awscli and boto3 - they're both required by utils, and
are generating a lot of PR noise
2018-02-27 11:25:57 +00:00
Leo Hemsted
a5827f9397 Merge pull request #1682 from alphagov/pyup-update-pytest-xdist-1.22.0-to-1.22.1
Update pytest-xdist to 1.22.1
2018-02-21 16:26:10 +00:00
pyup-bot
45af9c14cc Update pytest from 3.4.0 to 3.4.1 2018-02-20 22:10:50 +00:00
pyup-bot
d9032f8562 Update pytest-xdist from 1.22.0 to 1.22.1 2018-02-19 22:29:29 +00:00
pyup-bot
87788d7a84 Update pytest-mock from 1.6.3 to 1.7.0 2018-02-16 21:24:23 +00:00
Chris Hill-Scott
d36b742e14 Automatically set environment vars before tests
Sometimes you just wanna run some tests directly using the `pytest`
command. But you’re in a new shell, and have forgotten to do
`source environment_test.sh`. The screen fills with red, and your day
just got a little bit worse.

This commit will stop this from ever happening again, by making the
setting environment variables part of running Pytest. It does this with
a plugin called pytest-env[1].

pytest.ini is the standard way of configuring pytest. Creating this file
where it didn’t exist before changes the behaviour of pytest, in that
it will now look for tests in the same directory as the file, rather
than defaulting to the `tests/` directory. So we also have to explicitly
configure pytest[2] to tell it that it should only look in this
directory. Otherwise it gets lost in the weeds of `node_modules`.

This also changes the way that `SQLALCHEMY_DATABASE_URI` is overriden to
the convention used by this plugin.

1. https://github.com/MobileDynasty/pytest-env
2. https://docs.pytest.org/en/latest/customize.html#confval-testpaths

fixup! Remove environment_test.sh
2018-02-14 12:19:12 +00:00
pyup-bot
041c9ee9b5 Update pytest from 3.3.2 to 3.4.0 2018-01-30 23:19:54 +00:00
pyup-bot
a997fe94a8 Update pytest-xdist from 1.21.0 to 1.22.0 2018-01-11 20:27:25 +00:00
pyup-bot
4ef287e8b2 Update pytest from 3.3.1 to 3.3.2 2018-01-05 00:00:16 +00:00
Leo Hemsted
d2080d754f update requirements.txt 2017-12-28 10:58:15 +00:00
Leo Hemsted
53fe567cdc Merge branch 'master' into pyup-update-pytest-3.3.0-to-3.3.1 2017-12-06 16:08:42 +00:00
pyup-bot
b53fe651cb Update pytest from 3.3.0 to 3.3.1 2017-12-06 01:21:54 +00:00
pyup-bot
7fd0bf8bd8 Update requests-mock from 1.3.0 to 1.4.0 2017-12-05 23:18:56 +00:00
Leo Hemsted
6ff9b8526a Merge branch 'master' into pyup-update-pytest-3.2.5-to-3.3.0 2017-11-28 15:33:47 +00:00
Leo Hemsted
90e9a2f1b3 use flake8 instead of pycodestyle
since there are thousands and thousands of errors in the tests files
at the moment, i propose fixing those errors in separate PR for now.
2017-11-28 14:28:01 +00:00
pyup-bot
8b6036e0e2 Update pytest from 3.2.5 to 3.3.0 2017-11-27 22:37:37 +00:00
pyup-bot
46f55bf884 Update pytest from 3.2.3 to 3.2.5 2017-11-15 12:23:10 +00:00
pyup-bot
6a48381a4c Update pytest-xdist from 1.20.0 to 1.20.1 2017-10-05 21:35:58 +01:00
pyup-bot
0f4a3ce8a6 Update pytest from 3.2.2 to 3.2.3 2017-10-04 22:18:02 +01:00
pyup-bot
acf8d663f5 Update pytest-mock from 1.6.2 to 1.6.3 2017-09-16 01:23:26 +01:00
Rebecca Law
1c766206a1 Remove moto dependency.
We are no longer using moto for testing.
2017-09-13 09:10:54 +01:00
pyup-bot
1f6fa02e48 Update moto from 1.1.4 to 1.1.5 2017-09-12 23:03:22 +01:00
pyup-bot
e912527a61 Update moto from 1.1.2 to 1.1.4 2017-09-11 20:48:22 +01:00
Rebecca Law
0a21f1f3e8 Small refactor to how notification_schemas are tested.
My local build was not always getting the optional requirement for the jsonschema uri format checker (rfc3987).
The requirement has been added to the requirements_for_test file.
I changed the tests to validate the response schema from the post_notifications tests, this way we can tell if we are breaking the contract.
This showed that the email_from was not returning the entire email address but just the username, that has been corrected here.
Removed the response schema validation tests since they are not being testing in the post notification tests.
2017-09-11 11:10:45 +01:00
Leo Hemsted
660083b7e7 Merge pull request #1234 from alphagov/pyup-update-pytest-3.2.1-to-3.2.2
Update pytest to 3.2.2
2017-09-08 11:54:09 +01:00
pyup-bot
154c8a098e Update moto from 1.1.1 to 1.1.2 2017-09-07 20:18:15 +01:00
pyup-bot
772c03e2e5 Update pytest from 3.2.1 to 3.2.2 2017-09-07 18:58:14 +01:00
Leo Hemsted
3d4dbaa632 run tests in multiple threads at once
previously we didn't do this because the tests all used the same DB
(test_notifications_api), however @minglis shared a snippet that simply
creates one test db per thread.
2017-08-29 17:46:11 +01:00
Chris Hill-Scott
d0be79cc4c Remove Swagger specification
This was only ever a spike into what it might look like to document
Notify’s API with Swagger (see
7c3d25a87a).
It’s no longer updated, and only talks about version 1 of the public
API.

Keeping it around now is just a liability, and gives us additional Pyup
upgrades to deal with.
2017-08-29 10:32:37 +01:00
pyup-bot
ace28f2e85 Update moto from 1.0.1 to 1.1.1 2017-08-26 08:17:55 +01:00
pyup-bot
e8a8f72551 Update coveralls from 1.1 to 1.2.0 2017-08-16 04:20:36 +01:00
pyup-bot
06d4da57ae Update pytest from 3.2.0 to 3.2.1 2017-08-09 22:10:25 +01:00
pyup-bot
d16650c849 Update pytest from 3.1.3 to 3.2.0 2017-08-01 23:40:13 +01:00
Leo Hemsted
cc32cff32a bump test requirements
also ignore celery improvements
2017-07-25 11:40:12 +01:00
Chris Hill-Scott
c2999ed5ad Use pycodestyle instead of PEP8
PEP8 was renamed to pycodestyle; this issue explains why:
https://github.com/PyCQA/pycodestyle/issues/466

This commit changes our tests to use pycodestyle instead of pep8.

It also means:
- making a couple of whitespace changes to appease the linter
- disabling warnings for bare `Except`s (ie `Except` instead of `Except
  ValueError`) – this seems like a sensible thing to catch but I’m not
  going to make meaningful code changes in this commit
2017-02-01 09:19:32 +00:00
Rebecca Law
83f3c92c24 Move jsonschema to requirements.txt to missing dependency 2016-11-02 14:02:06 +00:00
Leo Hemsted
aebaea1072 add public contract tests
use jsonschema to test the GET /notification/{} endpoint to highlight any key name/format/type changes
2016-08-30 15:55:52 +01:00
Leo Hemsted
fa3d4413e7 update test requirements
requirements should be kept up to date to ensure we get bug fixes and new features as they come - particularly py.test, which we were running an 18 month old version for, and missing out on some useful xfail and fixture enhancements, among other things
2016-08-30 15:55:23 +01:00
Leo Hemsted
29df7edaf9 tests for detailed services 2016-08-24 15:00:51 +01:00
Chris Hill-Scott
7c3d25a87a Publish a Swagger specification
Adds a new endpoint (`/spec`) which returns a the specification of the
API in Swagger-formatted JSON.

This means we will have something to point frontends at, so we can
evaluate which ones we like.

Right now it’s all hand-defined. If we were consistent about our use of
Marshmallow we could generated the spec from the Marshmallow schemas.
2016-06-29 12:07:32 +01:00
Chris Hill-Scott
4f145c245a Add code coverage 2016-06-17 17:09:50 +01:00
Leo Hemsted
a3b847bf64 tests for send_sms through mmg/firetext 2016-06-01 15:59:44 +01:00
Martyn Inglis
57e05feafb Updated the Provider stats and rates DAO objects to query based on the identifier in the ProviderDetails object.
- updated all tests
- changed teardown to leave provider details rows on end of individual tests
2016-05-06 09:09:47 +01:00
Martyn Inglis
44632c36d3 Add sender name to the notification
- also ensure that the created time is handled properly
2016-02-25 11:23:04 +00:00