Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expect/Verify Expectations No Longer Works #23

Open
garnesen opened this issue Mar 30, 2020 · 3 comments
Open

Expect/Verify Expectations No Longer Works #23

garnesen opened this issue Mar 30, 2020 · 3 comments

Comments

@garnesen
Copy link

garnesen commented Mar 30, 2020

Mockserver-friendly-client calls verify with:

{
    "httpRequest": {...},
    "times": {
        "exact": true,
        "count": self.count
    }
}

But MockServer expects:

{
    "httpRequest": {...},
    "times": {
        "atLeast": true
        "atMost": self.count
    }
}

Verify documentation

I suggest changing

def for_verification(self):
return {"exact": True, "count": self.count}

to return {"atLeast": self.count, "atMost": self.count}

@lindycoder
Copy link
Contributor

I think it's because the API changed at one point, this repo currently supports jamesdbloom/mockserver:mockserver-5.4.1.

I think it'd be nice to support new versions but we'd need either to instruct the client on the server's version or have a different tag/branch for new versions.

@garnesen
Copy link
Author

IMO it makes the most sense to update to a new major or minor version to signify breaking changes. MockServer 5.4.1 was released in June of 2018, and is now up to 5.10.0. It would be great to update the library to use the latest version of MockServer. I can create a PR to update to the latest version if you'd prefer.

@lindycoder
Copy link
Contributor

Please do, we could probably tag 0.4.0 with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants