Пример #1
0
 def feed_items_in_correct_format(self):
     result = testCommon.curl(url + '/api/feed/',
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     for item in obj:
         assert 'git_link' in item # Item present in feed object
         assert 'last_edit' in item # Item present in feed object
         assert 'owner' in item # Item present in feed object
         assert 'posted_date' in item # Item present in feed object
         assert 'project_members' in item # Item present in feed object
         assert 'short_desc' in item # Item present in feed object
         assert 'title' in item # Item present in feed object
         assert 'update' in item # Item present in feed object
Пример #2
0
 def feed_items_in_correct_format(self):
     result = testCommon.curl(url + '/api/feed/',
                              read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     for item in obj:
         assert 'git_link' in item  # Item present in feed object
         assert 'last_edit' in item  # Item present in feed object
         assert 'owner' in item  # Item present in feed object
         assert 'posted_date' in item  # Item present in feed object
         assert 'project_members' in item  # Item present in feed object
         assert 'short_desc' in item  # Item present in feed object
         assert 'title' in item  # Item present in feed object
         assert 'update' in item  # Item present in feed object
Пример #3
0
 def project_members_is_array(self):
     result = testCommon.curl(url + '/api/feed/',
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     for item in obj:
         assert type(item['project_members']) == ListType
Пример #4
0
 def feed_array_is_non_empty(self):
     result = testCommon.curl(url + '/api/feed/',
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert len(obj) > 0 # User navargas should have a multi-item feed
Пример #5
0
 def feed_returns_array(self):
     result = testCommon.curl(url + '/api/feed/',
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert type(obj) == ListType # Returned object should be an array
Пример #6
0
 def returns_not_enough_data_without_title(self):
     data = testCommon.curl(url + '/api/projects/',
                            PUT="action=new_project",
                            read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(data)
     assert obj['error'] == 'Not enough data'
Пример #7
0
 def my_projects_returns_array(self):
     result = testCommon.curl(
         url + '/api/projects/?action=my_projects&user=navargas',
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert type(obj) == ListType  # Returned object should be an array
Пример #8
0
 def returns_not_enough_data_without_title(self):
     data = testCommon.curl(url + '/api/projects/', PUT="action=new_project",
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(data)
     assert obj['error'] == 'Not enough data'
Пример #9
0
 def my_projects_returns_array(self):
     result = testCommon.curl(url + '/api/projects/?action=my_projects&user=navargas',
         read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert type(obj) == ListType # Returned object should be an array
Пример #10
0
 def get_returns_warnings(self):
     result = testCommon.curl(url + '/api/projects/', read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert obj['error'] == 'Not enough data' # Should return correct warning
Пример #11
0
 def project_members_is_array(self):
     result = testCommon.curl(url + '/api/feed/',
                              read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     for item in obj:
         assert type(item['project_members']) == ListType
Пример #12
0
 def feed_array_is_non_empty(self):
     result = testCommon.curl(url + '/api/feed/',
                              read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert len(obj) > 0  # User navargas should have a multi-item feed
Пример #13
0
 def feed_returns_array(self):
     result = testCommon.curl(url + '/api/feed/',
                              read_cookie_file=cookieFile)
     obj = testCommon.jsonToDict(result)
     assert type(obj) == ListType  # Returned object should be an array