forked from maxcutler/python-wordpress-xmlrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_users.py
More file actions
25 lines (18 loc) · 823 Bytes
/
Copy pathtest_users.py
File metadata and controls
25 lines (18 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from nose.plugins.attrib import attr
from tests import WordPressTestCase
from wordpress_xmlrpc.methods import users
from wordpress_xmlrpc.wordpress import WordPressUser, WordPressBlog, WordPressAuthor
class TestUsers(WordPressTestCase):
@attr('users')
def test_get_user_info(self):
user = self.client.call(users.GetUserInfo())
self.assertTrue(isinstance(user, WordPressUser))
self.assertEqual(user.nickname, self.username)
@attr('users')
def test_get_user_blogs(self):
blogs = self.client.call(users.GetUsersBlogs())
self.assert_list_of_classes(blogs, WordPressBlog)
@attr('users')
def test_get_authors(self):
authors = self.client.call(users.GetAuthors())
self.assert_list_of_classes(authors, WordPressAuthor)