clean up some usage of active in tests and remove it from service_api_client.create_service (created services are always active)

This commit is contained in:
Leo Hemsted
2016-11-08 15:37:25 +00:00
parent 045864f052
commit b885ce9cf4
4 changed files with 6 additions and 19 deletions

View File

@@ -40,7 +40,6 @@ def test_should_add_service_and_redirect_to_tour_when_no_services(app_,
assert mock_get_services_with_no_services.called
mock_create_service.assert_called_once_with(
service_name='testing the post',
active=False,
message_limit=app_.config['DEFAULT_SERVICE_LIMIT'],
restricted=True,
user_id=api_user_active.id,
@@ -73,7 +72,6 @@ def test_should_add_service_and_redirect_to_dashboard_when_existing_service(app_
assert mock_get_services.called
mock_create_service.assert_called_once_with(
service_name='testing the post',
active=False,
message_limit=app_.config['DEFAULT_SERVICE_LIMIT'],
restricted=True,
user_id=api_user_active.id,

View File

@@ -545,11 +545,7 @@ def test_switch_service_from_research_mode_to_normal(
with app_.test_request_context():
with app_.test_client() as client:
service = service_json(
"1234",
"Test Service",
[active_user_with_permissions.id],
message_limit=1000,
active=False,
users=[active_user_with_permissions.id],
restricted=True,
research_mode=True
)