forked from maxcutler/python-wordpress-xmlrpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
24 lines (18 loc) · 750 Bytes
/
Copy path__init__.py
File metadata and controls
24 lines (18 loc) · 750 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
from testconfig import config
import unittest
from wordpress_xmlrpc import Client
class WordPressTestCase(unittest.TestCase):
def setUp(self):
self.xmlrpc_url = config['wordpress']['url']
self.username = config['wordpress']['username']
self.userid = config['wordpress']['userid']
self.client = Client(self.xmlrpc_url,
self.username,
config['wordpress']['password'])
def assert_list_of_classes(self, lst, kls):
"""
Verifies that a list contains objects of a specific class.
"""
self.assertTrue(isinstance(lst, list))
for obj in lst:
self.assertTrue(isinstance(obj, kls))