Skip to content

Commit

Permalink
Add Domain Generator Algorithm (DGA) by date
Browse files Browse the repository at this point in the history
  • Loading branch information
pishchalnikov committed Mar 19, 2020
1 parent 44505cd commit 25ad29a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,14 @@ def test_http_method(self):

assert expected_methods == sorted(got_methods)

def test_dga(self):
faker = Faker()

assert faker.dga() != faker.dga()

expected_domain = 'cqphixmpdfp.com'
assert faker.dga(day=1, month=1, year=1000, tld='com', length=11) == expected_domain

def test_random_sample_unique(self):
from faker.providers import BaseProvider
provider = BaseProvider(self.generator)
Expand Down

0 comments on commit 25ad29a

Please sign in to comment.