Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit e24703e

Browse files
author
Tom Galloway
committed
Some further profile tests created.
1 parent c1d1be1 commit e24703e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

market/tests/test_profile.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def test_MarketProfile_get_success(self):
3838
self.assertEqual(1, p.social[0].type)
3939
self.assertEqual('test_fb_username', p.social[0].username)
4040

41+
def test_MarketProtocol_get_serialized_success(self):
42+
p = Profile(self.db).get(serialized=True)
43+
self.assertEqual("\n\ttest_name\x10\x02R\x0bhello worldr\x14\x08\x01\x12\x10test_fb_username", p)
44+
4145
def test_MarketProfile_remove_field_success(self):
4246
p = Profile(self.db)
4347
p.remove_field("about")
@@ -109,3 +113,11 @@ def test_MarketProfile_add_social_invalid(self):
109113
self.assertEqual(1, len(u.social))
110114
self.assertEqual(1, u.social[0].type)
111115
self.assertEqual('test_fb_username', u.social[0].username)
116+
117+
def test_MarketProfile_update_success(self):
118+
u = objects.Profile()
119+
u.about = "updated world"
120+
p = Profile(self.db)
121+
p.update(u)
122+
updated_user = p.get()
123+
self.assertEqual("updated world", updated_user.about)

0 commit comments

Comments
 (0)