Beispiel #1
0
 def test_with_target_url(self):
     expected = {
         'state': 'failure',
         'context': 'me',
         'target_url': 'https://devguide.python.org'
     }
     status = util.create_status('me',
                                 util.StatusState.FAILURE,
                                 target_url='https://devguide.python.org')
     assert status == expected
Beispiel #2
0
 def test_with_target_url(self):
     expected = {
         "state": "failure",
         "context": "me",
         "target_url": "https://devguide.python.org",
     }
     status = util.create_status("me",
                                 util.StatusState.FAILURE,
                                 target_url="https://devguide.python.org")
     assert status == expected
Beispiel #3
0
 def test_with_everything(self):
     expected = {
         'state': 'failure',
         'context': 'me',
         'description': 'desc',
         'target_url': 'https://devguide.python.org'
     }
     status = util.create_status('me',
                                 util.StatusState.FAILURE,
                                 description='desc',
                                 target_url='https://devguide.python.org')
     assert status == expected
Beispiel #4
0
 def test_with_everything(self):
     expected = {
         "state": "failure",
         "context": "me",
         "description": "desc",
         "target_url": "https://devguide.python.org",
     }
     status = util.create_status(
         "me",
         util.StatusState.FAILURE,
         description="desc",
         target_url="https://devguide.python.org",
     )
     assert status == expected
Beispiel #5
0
 def test_with_description(self):
     expected = {"state": "error", "context": "me", "description": "desc"}
     status = util.create_status("me",
                                 util.StatusState.ERROR,
                                 description="desc")
     assert status == expected
Beispiel #6
0
 def test_simple_case(self):
     expected = {"state": "success", "context": "me"}
     assert util.create_status("me", util.StatusState.SUCCESS) == expected
Beispiel #7
0
 def test_with_description(self):
     expected = {'state': 'error', 'context': 'me', 'description': 'desc'}
     status = util.create_status('me',
                                 util.StatusState.ERROR,
                                 description='desc')
     assert status == expected
Beispiel #8
0
 def test_simple_case(self):
     expected = {'state': 'success', 'context': 'me'}
     assert util.create_status('me', util.StatusState.SUCCESS) == expected