def test_check_submissions_only_invalid_submissions(self): invalid, valid = [], [] reddit = Login.create_reddit_object() object_list = [ "https://www.reddit.com/r/heresaninvalidlinkjasdfhuwhrpguhpasdf/" ] Validation._check_submissions(invalid, object_list, reddit, valid) assert not valid assert len(invalid) == 1
def test_check_submissions_only_valid_submissions(self): invalid, valid = [], [] reddit = Login.create_reddit_object() object_list = [ "https://www.reddit.com/r/announcements/comments/mcisdf/an_update_on_the_recent_issues_surrounding_a/" ] Validation._check_submissions(invalid, object_list, reddit, valid) assert len(valid) == 1 assert not invalid
def test_check_submissions_both_valid_and_invalid_submissions(self): invalid, valid = [], [] reddit = Login.create_reddit_object() object_list = [ "https://www.reddit.com/r/announcements/comments/mcisdf/an_update_on_the_recent_issues_surrounding_a/", "https://www.reddit.com/r/heresaninvalidlinkjasdfhuwhrpguhpasdf/" ] Validation._check_submissions(invalid, object_list, reddit, valid) assert len(valid) == 1 assert len(invalid) == 1