Skip to content

Conversation

@eznix86
Copy link

@eznix86 eznix86 commented Sep 14, 2023

Usage:

compare = {
   "item": JsonCompareRegex(r"\s+"),
   "item1": JsonCompareRegex(r"\d+"),
   "item2": JsonCompareRegex("[A-Z]+"),
   "item3": JsonCompareRegex(r"^%?FRRouting/")
}

Example of errors:

E       topotato.exceptions.TopotatoCLICompareFail: json["item"] dict value is different (
E       1 vs regex '\\s+')
E       topotato.exceptions.TopotatoCLICompareFail: json["item1"] dict value is different (
E       abcd vs regex '\\d+')

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants