Fixed imports which were producing broken tests

- Some tests for failing because of an import which was overriding the
one above it in test_scheduled_tasks.py
- Import error fixed in test_services_dao.py after a rename of a method
This commit is contained in:
Richard Chapman
2017-11-09 11:33:56 +00:00
parent 98b762869d
commit 59df6bdbb6
8 changed files with 45 additions and 9 deletions

View File

@@ -0,0 +1,2 @@
email_address
test@test.com
1 email_address
2 test@test.com

View File

@@ -0,0 +1 @@
phone number
1 phone number

View File

@@ -0,0 +1,11 @@
EMAILADDRESS
test1@test.com
test2@test.com
test3@test.com
test4@test.com
test5@test.com
test6@test.com
test7@test.com
test8@test.com
test9@test.com
test0@test.com
1 EMAILADDRESS
2 test1@test.com
3 test2@test.com
4 test3@test.com
5 test4@test.com
6 test5@test.com
7 test6@test.com
8 test7@test.com
9 test8@test.com
10 test9@test.com
11 test0@test.com

View File

@@ -0,0 +1,11 @@
address_line_1, address_line_2, address_line_3
name1, street1, town1, postcode1
name2, street2, town2, postcode2
name3, street3, town3, postcode3
name4, street4, town4, postcode4
name5, street5, town5, postcode5
name6, street6, town6, postcode6
name7, street7, town7, postcode7
name8, street8, town8, postcode8
name9, street9, town9, postcode9
name0, street0, town0, postcode0
1 address_line_1, address_line_2, address_line_3
2 name1, street1, town1, postcode1
3 name2, street2, town2, postcode2
4 name3, street3, town3, postcode3
5 name4, street4, town4, postcode4
6 name5, street5, town5, postcode5
7 name6, street6, town6, postcode6
8 name7, street7, town7, postcode7
9 name8, street8, town8, postcode8
10 name9, street9, town9, postcode9
11 name0, street0, town0, postcode0

View File

@@ -0,0 +1,11 @@
PhoneNumber,Name
+441234123121,chris
+441234123122,chris
+441234123123,chris
+441234123124,chris
+441234123125,chris
+441234123126,chris
+441234123127,chris
+441234123128,chris
+441234123129,chris
+441234123120,chris
1 PhoneNumber Name
2 +441234123121 chris
3 +441234123122 chris
4 +441234123123 chris
5 +441234123124 chris
6 +441234123125 chris
7 +441234123126 chris
8 +441234123127 chris
9 +441234123128 chris
10 +441234123129 chris
11 +441234123120 chris

View File

@@ -0,0 +1,2 @@
PHONE NUMBER, IGNORE THIS COLUMN
+441234123123, nope
1 PHONE NUMBER IGNORE THIS COLUMN
2 +441234123123 nope

View File

@@ -56,19 +56,16 @@ from app.models import (
from app.utils import get_london_midnight_in_utc
from app.v2.errors import JobIncompleteError
from tests.app.db import create_notification, create_service, create_template, create_job, create_rate
from tests.app.conftest import (
sample_job as create_sample_job,
sample_notification_history as create_notification_history,
sample_template as create_sample_template,
create_custom_template,
datetime_in_past
)
from tests.app.aws.test_s3 import single_s3_object_stub
from tests.conftest import set_config_values, notify_db, notify_db_session
from tests.app.conftest import (
sample_notification as create_notification,
sample_notification_history as create_notification_history,
sample_template as create_sample_template
)
from tests.conftest import set_config_values
def _create_slow_delivery_notification(provider='mmg'):

View File

@@ -31,7 +31,8 @@ from app.dao.services_dao import (
dao_resume_service,
dao_fetch_active_users_for_service,
dao_fetch_service_by_inbound_number,
dao_fetch_monthly_historical_stats_by_template_for_service_without_status)
dao_fetch_monthly_historical_stats_by_template
)
from app.dao.service_permissions_dao import dao_add_service_permission, dao_remove_service_permission
from app.dao.users_dao import save_model_user
from app.models import (
@@ -1022,7 +1023,7 @@ def test_dao_fetch_monthly_historical_stats_by_template(notify_db, notify_db_ses
notification_history(created_at=datetime(2016, 4, 1), sample_template=template_two)
notification_history(created_at=datetime.now(), sample_template=template_two)
results = dao_fetch_monthly_historical_stats_by_template_for_service_without_status()
results = dao_fetch_monthly_historical_stats_by_template()
assert len(results) == 2