示例#1
0
    def test_check_redditor_both_valid_and_invalid_redditors(self):
        invalid, valid = [], []
        reddit = Login.create_reddit_object()

        object_list = ["spez", "sdhfgiuoh3284th9enbsprgh8-w-wher9ghwe9hw49"]

        Validation._check_redditors(invalid, object_list, reddit, valid)

        assert len(valid) == 1
        assert len(invalid) == 1
示例#2
0
    def test_check_redditor_only_valid_redditors(self):
        invalid, valid = [], []
        reddit = Login.create_reddit_object()

        object_list = ["spez"]

        Validation._check_redditors(invalid, object_list, reddit, valid)

        assert len(valid) == 1
        assert not invalid