changed variable names in tests/test_linkedin_links.py

This commit is contained in:
csparks
2019-09-08 01:04:05 +00:00
parent 0bdf2a182a
commit 5fe745537f
+4 -4
View File
@@ -17,12 +17,12 @@ class TestGetLinks(object):
def test_links_linkedin(self):
dir_path = os.path.dirname(os.path.realpath(__file__))
f = open(dir_path + "/test_linkedin_links.txt").read()
mock_response = open(dir_path + "/test_linkedin_links.txt").read()
reg_links = re.compile(r"url=https:\/\/www\.linkedin.com(.*?)&")
temp = reg_links.findall(f)
temp = reg_links.findall(mock_response)
resul = []
for x in temp:
y = x.replace("url=", "")
for regex_item in temp:
stripped_url = regex_item.replace("url=", "")
resul.append("https://www.linkedin.com" + y)
assert set(resul)