Add tests
This commit is contained in:
parent
01d61fce9f
commit
4d84f11f78
|
@ -5,7 +5,6 @@
|
||||||
pytest==3.7.1
|
pytest==3.7.1
|
||||||
WebTest==2.0.30
|
WebTest==2.0.30
|
||||||
factory-boy==2.11.1
|
factory-boy==2.11.1
|
||||||
eth-tester[py-evm]==0.1.0b33
|
|
||||||
|
|
||||||
# Lint and code style
|
# Lint and code style
|
||||||
flake8==3.5.0
|
flake8==3.5.0
|
||||||
|
|
|
@ -108,3 +108,17 @@ class TestProposalAPI(BaseProposalCreatorConfig):
|
||||||
self.proposal.status = PENDING # should be APPROVED
|
self.proposal.status = PENDING # should be APPROVED
|
||||||
resp = self.app.put("/api/v1/proposals/{}/publish".format(self.proposal.id))
|
resp = self.app.put("/api/v1/proposals/{}/publish".format(self.proposal.id))
|
||||||
self.assert400(resp)
|
self.assert400(resp)
|
||||||
|
|
||||||
|
# /
|
||||||
|
def test_get_proposals(self):
|
||||||
|
self.test_publish_proposal_approved()
|
||||||
|
resp = self.app.get("/api/v1/proposals/")
|
||||||
|
self.assert200(resp)
|
||||||
|
|
||||||
|
def test_get_proposals_does_not_include_team_member_email_addresses(self):
|
||||||
|
self.test_publish_proposal_approved()
|
||||||
|
resp = self.app.get("/api/v1/proposals/")
|
||||||
|
self.assert200(resp)
|
||||||
|
for each_proposal in resp.json:
|
||||||
|
for team_member in each_proposal["team"]:
|
||||||
|
self.assertIsNone(team_member.get('email_address'))
|
||||||
|
|
Loading…
Reference in New Issue