Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
laramies
GitHub Repository: laramies/theHarvester
Path: blob/master/tests/test_myparser.py
606 views
1
#!/usr/bin/env python3
2
# coding=utf-8
3
4
import pytest
5
6
from theHarvester.parsers import myparser
7
8
9
class TestMyParser(object):
10
@pytest.mark.asyncio
11
async def test_emails(self) -> None:
12
word = "domain.com"
13
results = "@domain.com***a@domain***banotherdomain.com***[email protected]***[email protected]***"
14
parse = myparser.Parser(results, word)
15
emails = sorted(await parse.emails())
16
assert emails, ["[email protected]", "[email protected]"]
17
18
19
if __name__ == "__main__":
20
pytest.main()
21
22