Skip to content

Commit 6328cdb

Browse files
committed
added test for load_random_user_agents
1 parent 83457fb commit 6328cdb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/helpers/test_file_helper.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import sys
44

55
from collections import namedtuple
6-
from VHostScan.lib.helpers.file_helper import parse_word_list_argument, get_combined_word_lists
6+
from VHostScan.lib.helpers.file_helper import parse_word_list_argument, get_combined_word_lists, load_random_user_agents
77

88
WORDLIST_FILES = {
99
'simpsons': ['marge', 'bart', 'homer', 'lisa', 'maggie'],
@@ -39,3 +39,9 @@ def test_get_combined_word_lists(wordlist):
3939

4040
assert wordlist.files == result['file_paths']
4141
assert wordlist.words == result['words']
42+
43+
def test_load_random_user_agents():
44+
expected = ['Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36',
45+
'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0']
46+
47+
assert load_random_user_agents() == expected

0 commit comments

Comments
 (0)