Changeset 97e09f4 in flex_extract.git for python/pythontest/TestTools.py


Ignore:
Timestamp:
Sep 2, 2018, 12:32:04 PM (3 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev, feature/makefiles, origin/task/language-editing, task/language-editing
Children:
efa05d7
Parents:
f9f7b3f
Message:

completed testing and adaptations of ecacces job-submit and file-put functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/pythontest/TestTools.py

    rf9f7b3f r97e09f4  
    117117        assert True
    118118
    119     @pytest.mark.msuser
     119    def test_fail_put_file_to_ecserver(self):
     120        ecuid=os.environ['ECUID']
     121        ecgid=os.environ['ECGID']
     122        with pytest.raises(SystemExit) as pytest_wrapped_e:
     123            put_file_to_ecserver('TestData/', 'testfil.txt',
     124                                 'ecgate', ecuid, ecgid)
     125        assert pytest_wrapped_e.type == SystemExit
     126        assert pytest_wrapped_e.value.code == '... ECACCESS-FILE-PUT FAILED!'
     127
    120128    def test_success_put_file_to_ecserver(self):
     129        ecuid=os.environ['ECUID']
     130        ecgid=os.environ['ECGID']
     131        result = put_file_to_ecserver('TestData/', 'testfile.txt',
     132                                      'ecgate', ecuid, ecgid)
     133        assert result == ''
     134
     135    @pytest.mark.msuser_pw
     136    def test_fullsuccess_put_file_to_ecserver(self):
    121137        ecuid=os.environ['ECUID']
    122138        ecgid=os.environ['ECGID']
     
    134150    def test_success_submit_job_to_ecserver(self):
    135151        result = submit_job_to_ecserver('ecgate', 'TestData/testfile.txt')
    136         assert result == 0
    137 
     152        assert result.strip().isdigit() == True
    138153
    139154
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG