def test_list_all(self, fake_client):
     """
     Test organization class 'list_all()'  Method
     """
     org = Organizations(fake_client, "https://api.buildkite.com/v2/")
     org.list_all()
     fake_client.get.assert_called_with(org.path)
 def test_list_all_with_pagination(self, fake_client):
     """
     Test organization class 'list_all()'  Method with pagination
     """
     org = Organizations(fake_client, "https://api.buildkite.com/v2/")
     org.list_all(page=2, with_pagination=True)
     fake_client.get.assert_called_with(org.path,
                                        query_params={"page": 2},
                                        with_pagination=True)
示例#3
0
def test_list_all(fake_client):
    """pye
    Test organization class 'list_all()'  Method
    """
    org = Organizations(fake_client, "https://api.buildkite.com/v2/")
    org.list_all()
    fake_client.get.assert_called_with(org.path,
                                       query_params={"page": 0},
                                       with_pagination=False)