Skip to content

Commit 066a262

Browse files
author
Andres Tarantini
committed
Tests: Update customer data.
1 parent 5897aae commit 066a262

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pymango/tests/tests_resources.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
PyMango Tests for Resources
33
"""
44
import os
5+
from random import randint
56

67
from nose.tools import eq_, ok_, raises
78

@@ -117,6 +118,14 @@ def test_customers_get():
117118
ok_(customer.get("uid"))
118119

119120

121+
def test_customers_update():
122+
"""Should update customer data"""
123+
sample_name = "test-pymango-{0}".format(randint(1000, 999999))
124+
customer_uid = mango.Customers.list()[0].get("uid")
125+
ok_(mango.Customers.update(customer_uid, name=sample_name))
126+
eq_(sample_name, mango.Customers.get(customer_uid).get("name"))
127+
128+
120129
@raises(mango.error.NotFound)
121130
def test_customers_delete():
122131
"""Should delete a customer"""

0 commit comments

Comments
 (0)