import pytest
from theHarvester.parsers import myparser
class TestMyParser(object):
@pytest.mark.asyncio
async def test_emails(self) -> None:
word = "domain.com"
results = "@domain.com***a@domain***banotherdomain.com***[email protected]***[email protected]***"
parse = myparser.Parser(results, word)
emails = sorted(await parse.emails())
assert emails, ["[email protected]", "[email protected]"]
if __name__ == "__main__":
pytest.main()