mirror of
https://github.com/laramies/theHarvester.git
synced 2024-11-13 11:06:39 +08:00
20 lines
464 B
Python
Executable file
20 lines
464 B
Python
Executable file
#!/usr/bin/env python3
|
|
# coding=utf-8
|
|
|
|
from parsers import myparser
|
|
import pytest
|
|
|
|
|
|
class TestMyParser(object):
|
|
|
|
def test_emails(self):
|
|
word = 'domain.com'
|
|
results = '@domain.com***a@domain***banotherdomain.com***c@domain.com***d@sub.domain.com***'
|
|
parse = myparser.Parser(results, word)
|
|
emails = sorted(parse.emails())
|
|
assert emails, ['c@domain.com', 'd@sub.domain.com']
|
|
|
|
|
|
if __name__ == '__main__':
|
|
pytest.main()
|
|
|