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
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
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
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
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'
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
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
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