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

Add tests #6

Merged
merged 6 commits into from
Oct 18, 2018
Merged

Add tests #6

merged 6 commits into from
Oct 18, 2018

Conversation

tenyo
Copy link
Contributor

@tenyo tenyo commented Oct 12, 2018

Using s3iface.S3API to mock calls to S3

wantBody := `{"questions":{"1":{"text":"Do you have HIPAA data?","long_text":"","answers":{"a":{"text":"Yes","datatypes":null},"b":{"text":"No","datatypes":null}}}},"version":"2.0","risklevels_version":"1.0","updated":""}`
wantCode := 200

got := as.HTML("/v1/proctor/test/questions").Get()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as.JSON(...) ?

wantBody := `{"risklevels":[{"text":"high","score":30,"datatypes":["HIPAA","PCI","SSN"]},{"text":"moderate","score":20,"datatypes":["FERPA"]},{"text":"low","score":0,"datatypes":[]}],"version":"1.0","updated":""}`
wantCode := 200

got := as.HTML("/v1/proctor/risklevels").Get()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@fishnix
Copy link

fishnix commented Oct 18, 2018

this is awesome! just the super minor comment 👍

@tenyo tenyo merged commit 451c69a into master Oct 18, 2018
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.

2 participants