Skip to content

Commit acbb42f

Browse files
author
Andres Tarantini
committed
Tests: Update Card with new ccv.
1 parent 066a262 commit acbb42f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pymango/tests/tests_resources.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ def _create_token():
3535
return token_response.get("uid")
3636

3737

38+
def _create_ccv():
39+
ccv_response = mango.client.req(
40+
public_test_key,
41+
"post",
42+
"v1/ccvs/",
43+
data={"ccv": randint(100, 999)}
44+
)
45+
return ccv_response.get("uid")
46+
47+
3848
#
3949
# Charges
4050
#
@@ -155,6 +165,12 @@ def test_cards_get():
155165
ok_(card)
156166

157167

168+
def test_cards_update():
169+
"""Should update card CCV"""
170+
card_uid = mango.Cards.get(mango.Cards.list()[0].get("uid")).get("uid")
171+
ok_(mango.Cards.update(card_uid, ccv=_create_ccv()))
172+
173+
158174
@raises(mango.error.NotFound)
159175
def test_cards_delete():
160176
"""Should delete a Card"""

0 commit comments

Comments
 (0)