diff options
Diffstat (limited to 'tests/signalTests')
-rw-r--r-- | tests/signalTests/test_checklist_signal.py | 64 | ||||
-rw-r--r-- | tests/signalTests/test_git_signal.py | 21 |
2 files changed, 34 insertions, 51 deletions
diff --git a/tests/signalTests/test_checklist_signal.py b/tests/signalTests/test_checklist_signal.py index ae22578..7d3cd1c 100644 --- a/tests/signalTests/test_checklist_signal.py +++ b/tests/signalTests/test_checklist_signal.py @@ -1,5 +1,5 @@ - -# ============LICENSE_START========================================== + +# ============LICENSE_START========================================== # org.onap.vvp/test-engine # =================================================================== # Copyright © 2017 AT&T Intellectual Property. All rights reserved. @@ -36,33 +36,33 @@ # ============LICENSE_END============================================ # # ECOMP is a trademark and service mark of AT&T Intellectual Property. -'''
-Created on 16 Nov 2016
-'''
-from django.conf import settings
-
-from iceci.decorator.exception_decor import exception
-from services.constants import Constants
-from services.logging_service import LoggingServiceFactory
-from services.types import API, DB
-from tests.signalTests.test_signal_base import TestSignalBase
-
-
-logger = LoggingServiceFactory.get_logger()
-
-
-class TestChecklistSignal(TestSignalBase):
-
- @exception()
- def test_archive_checklist_after_editing_files(self):
- if settings.DATABASE_TYPE == 'local':
- logger.debug("Local environment, skipping test...")
- else:
- user_content = API.VirtualFunction.create_engagement()
- API.GitLab.git_clone_push(user_content, yaml=True)
- token = "token " + API.User.login_user(user_content['el_email'])
- user_content['session_token'] = token
- cl_content = API.Checklist.retrieve_heat_checklist(user_content)
- API.GitLab.git_push_commit(user_content, yaml=True)
- DB.Checklist.state_changed(
- "uuid", cl_content['uuid'], Constants.ChecklistStates.Archive.TEXT)
+''' +Created on 16 Nov 2016 +''' +from django.conf import settings + +from iceci.decorator.exception_decor import exception +from services.constants import Constants +from services.logging_service import LoggingServiceFactory +from services.types import API, DB +from tests.signalTests.test_signal_base import TestSignalBase + + +logger = LoggingServiceFactory.get_logger() + + +class TestChecklistSignal(TestSignalBase): + + @exception() + def test_archive_checklist_after_editing_files(self): + if settings.DATABASE_TYPE == 'local': + logger.debug("Local environment, skipping test...") + else: + user_content = API.VirtualFunction.create_engagement() + API.GitLab.git_clone_push(user_content) + token = "token " + API.User.login_user(user_content['el_email']) + user_content['session_token'] = token + cl_content = API.Checklist.create_checklist(user_content) + API.GitLab.git_push_commit(user_content) + DB.Checklist.state_changed( + "uuid", cl_content['uuid'], Constants.ChecklistStates.Archive.TEXT) diff --git a/tests/signalTests/test_git_signal.py b/tests/signalTests/test_git_signal.py index d008787..63290d2 100644 --- a/tests/signalTests/test_git_signal.py +++ b/tests/signalTests/test_git_signal.py @@ -1,5 +1,5 @@ - -# ============LICENSE_START========================================== + +# ============LICENSE_START========================================== # org.onap.vvp/test-engine # =================================================================== # Copyright © 2017 AT&T Intellectual Property. All rights reserved. @@ -301,20 +301,3 @@ class TestGitSignal(TestSignalBase): "Invited user: " + email + " and" + second_invited_email['full_name'] + " found in GitLab.") logger.debug( "Inviter and invited users were created successfully on GitLab!") - - @exception() - def test_push_yaml_files_to_repo_check_decline_of_cl(self): - - if settings.DATABASE_TYPE == 'local': - logger.debug("Local environment, skipping test...") - else: - user_content = API.VirtualFunction.create_engagement() - token = "token " + API.User.login_user(user_content['el_email']) - user_content['session_token'] = token - cl_content_before_push_and_decline = API.Checklist.retrieve_heat_checklist( - user_content) - API.GitLab.git_clone_push(user_content, yaml=True) - cl_content_after_push_and_decline = API.Checklist.retrieve_heat_checklist( - user_content) - Helper.internal_not_equal( - cl_content_before_push_and_decline, cl_content_after_push_and_decline) |