Katie Smith
6411e10d7b
Remove unused fixtures
2019-11-01 13:18:07 +00:00
Katie Smith
87d7ed21a2
Fix fixtures
...
Stopped 2 fixtures from calling other fixtures as functions and causing
errors.
2019-10-31 15:04:23 +00:00
Katie Smith
fb875c50c1
Stop fixtures in conftest from calling other fixtures
...
Stopped some the fixtures in conftest.py from calling other
fixtures as functions to make them Pytest 4 compliant.
2019-10-30 11:22:36 +00:00
Katie Smith
99c3837dc1
Fix the fixtures for templates lacking certain permissions
...
These fixtures were both calling other fixtures as functions and being
called as functions in the tests. Rewriting the tests to make them
Pytest 4 compatible means we are no longer using
`sample_template_without_letter_permission`, so this has been deleted.
2019-10-30 11:22:36 +00:00
Katie Smith
a2c25cec9f
Make a couple of fixtures Pytest 4 compliant
...
By stopping them from calling other fixtures as functions.
2019-09-18 12:01:20 +01:00
Katie Smith
62735ea125
Remove sample_notification_with_api_key fixture
...
This was only used once and was not Pytest 4 compatible.
2019-09-18 11:04:24 +01:00
Pea Tyczynska
9dfc550f46
Add org types table
2019-07-18 17:05:22 +01:00
Leo Hemsted
a0c0dec429
add tests
...
include dynamically loading the template contents from the alembic upgrade file itself
2019-07-12 15:14:13 +01:00
Rebecca Law
1f9aade749
- Adding test where post_notification can't send to a member outside of the team or whitelist.
...
- Updating some tests to be pytest4 compliant.
2019-06-11 16:45:35 +01:00
Katie Smith
844f22bcd0
Remove unused fixture and add test function to create permissions
2019-06-05 14:54:52 +01:00
Pea Tyczynska
615ea6a98a
Send verifcation email to a new reply-to email address
2019-05-23 15:36:09 +01:00
Alexey Bezhan
330afab5e2
Make Firetext URL configurable through the application environment
...
Similar to MMG, there's a new env variable FIRETEXT_URL that can be
used to override the Firetext api URL.
This will be used to stub out both providers during the load test or
can be used to run a local API against a fake provider endpoint.
2019-04-12 12:03:58 +01:00
Katie Smith
31ddd36e2c
Update invited user tests to take folder_permissions into account
2019-03-22 09:30:39 +00:00
Pea Tyczynska
211d3741ba
Send confirmation emails to users when team manager edits their
...
email address or mobile number.
2019-02-26 16:30:29 +00:00
Pea Tyczynska
8ef581de69
Remove service.postage and choose_postage permission from the code and tests
2019-02-11 18:20:34 +00:00
Pea Tyczynska
5b9e6c2086
Set postage on basis of postage argument or template postage
2019-02-06 13:23:09 +00:00
Pea Tyczynska
eea324a19d
Add flag on create_service to decide whether we should also check if service exists
2019-01-03 10:57:29 +00:00
Pea Tyczynska
f79c0b03e7
Sample job uses create_template instead of sample template
2019-01-03 10:52:14 +00:00
Pea Tyczynska
cde30de100
Use create_template instead of sample_template in sample_notification
2019-01-03 10:52:14 +00:00
Pea Tyczynska
154257027f
Nothing in conftest uses sample_service now :)
2019-01-03 10:52:14 +00:00
Pea Tyczynska
d367daaf6e
Some more conftest fixtures use create_service instead of sample_service
2019-01-03 10:52:14 +00:00
Pea Tyczynska
a3310c2da6
sample_job uses create_service instead of sample_service
2019-01-03 10:52:14 +00:00
Pea Tyczynska
0bcf13d85c
sample_api_key uses create_service instead of sample_service
2019-01-03 10:52:14 +00:00
Pea Tyczynska
e8ce669b72
Use create_service instead of sample_service when creating sample_email_template for tests
2019-01-03 10:52:14 +00:00
Pea Tyczynska
95115e7ae6
Use create_service instead of sample_service when creating service permission for tests
2019-01-03 10:52:14 +00:00
Pea Tyczynska
923703120b
Check if test service exists before it gets created
2019-01-03 10:52:14 +00:00
Pea Tyczynska
c12594949f
Refactor service_factory
2019-01-03 10:49:38 +00:00
Pea Tyczynska
686c58acee
Test post letter request sets notification postage correctly
2018-12-24 11:27:29 +00:00
Leo Hemsted
bf62d3ad5f
infer template/service from job for notification/ft_noti_status in db.py
2018-12-12 12:59:55 +00:00
Pea Tyczynska
f941b8b146
Use archived flag to see if job needs deleting from s3 bucket
2018-11-28 14:38:59 +00:00
Leo Hemsted
3589f1dd63
remove some use of calling fixtures directly
...
also experiment with giving the fixtures a different name, so we can be
sure that they won't be called in functions. Open to change on this.
2018-10-17 16:38:46 +01:00
Katie Smith
6727f0e0f5
Update ft_billing DAO functions to use postage
...
* Updated the 'fetch_billing_data_for_day' DAO function to take postage into
account
* Updated the 'update_fact_billing' DAO function to insert postage for
new rows. When updating rows which are identical apart from the postage, the
original row will be kept. (This behaviour will change once postage is
added to the primary key - at this point, upserting will add a new row.)
* Also changed some fixtures / test set up functions to take postage
into account
2018-09-28 13:52:17 +01:00
Rebecca Law
1c0892888f
Change the name of letter_class to postage, this will match the domain language used in the documentation.
...
Updated the tests to answer review comments.
2018-09-18 15:22:08 +01:00
Leo Hemsted
32415b3b14
add delete functions for inbound and callback api objects
...
Both service api tasks work fine if the object is unexpectedly deleted
halfway through - they both check to see if the api details are still
in the DB before trying to send the request.
2018-07-05 11:09:17 +01:00
Katie Smith
0d4fb81235
Delete ProviderStatistics model
...
This is not being used anywhere, so can be deleted safely.
2018-05-21 15:03:39 +01:00
venusbb
5d7d4a0dd6
Added test for reporting tasks
2018-03-14 17:07:52 +00:00
Rebecca Law
bffc4863db
Remove all methods no longer used now that we only send pdf files to DVLA.
2018-03-02 11:05:05 +00:00
Rebecca Law
7faf375375
Merge pull request #1695 from alphagov/org-user-endpoints
...
Organisation user endpoints
2018-02-26 16:27:01 +00:00
Alexey Bezhan
984a5050db
Don't return hidden templates in API service template responses
...
Brings back filtering hidden templates from the API responses.
2018-02-26 13:28:08 +00:00
Alexey Bezhan
9b3a9a55c4
Revert "Don't return hidden templates in API service template responses"
...
Filtering out hidden templates requires all existing templates to
have `hidden` flag set, which can only be done by a migration after
the code that sets the flag to `False` by default for new templates
has been released.
This removes the filtering logic until the migration has been released.
2018-02-26 11:44:25 +00:00
Alexey Bezhan
19dbe7da8d
Don't return hidden templates in API service template responses
...
Removes hidden templates from the service templates list and returns
404 when searching for a hidden template or template versions by ID.
2018-02-23 17:52:25 +00:00
Alexey Bezhan
e659253b01
Set Notify service user as the creator of Pre-compiled PDF template
2018-02-23 17:52:24 +00:00
Leo Hemsted
57a174aeb4
add tests for org invite rest, and update conftest
2018-02-23 10:45:18 +00:00
Ken Tsang
60f96ab598
Organisation service DAO
2018-02-13 14:06:43 +00:00
Rebecca Law
c54e0d322b
A little clean up
2017-12-28 10:58:15 +00:00
Ken Tsang
d0fcfa7d0c
Update sample_service_full_perms to leave out letters_as_pdf permissions
...
- as letters_as_pdf is a temporary service permission until the build dvla file process is deprecated rather than update all the tests to remove the permission so that they pass, lets remove it here instead
2017-12-12 12:07:55 +00:00
Ken Tsang
bc316dd1fe
Add reference as part of sample_letter_notification
2017-12-12 12:07:55 +00:00
Ken Tsang
16136317f9
Add letters pdf task
2017-12-12 12:07:55 +00:00
Leo Hemsted
4cdcc4e035
no longer add an annual billing entry creating a service
...
this is now handled by a separate call from the admin app
2017-12-06 14:45:44 +00:00
Leo Hemsted
b0d4044ff5
remove free_sms_fragment_limit from service
...
* remove from model
* still required when calling POST /service - we just call through
from dao_create_service to add a new annual billing entry.
* removed from POST /service/<id> update_service - if you want to
update/add a new one, use POST /service/<id>/free-sms-fragment-limit
* made sure tests create services with default 250k limit.
2017-12-06 14:45:43 +00:00