Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 6
0
 def test_simple_case(self):
     expected = {"state": "success", "context": "me"}
     assert util.create_status("me", util.StatusState.SUCCESS) == expected
Exemplo n.º 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
Exemplo n.º 8
0
 def test_simple_case(self):
     expected = {'state': 'success', 'context': 'me'}
     assert util.create_status('me', util.StatusState.SUCCESS) == expected