import datetime

import dnstwister.tools


def test2():
    """Looooong domain names highlighted that the idna decoding is slooooow.

    This is a basic benchmark for performance.
    """
    domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com'

    start = datetime.datetime.now()

    dnstwister.tools.fuzzy_domains(domain)

    duration = (datetime.datetime.now() - start).total_seconds()

    assert duration < 5, 'duration too long: {} secs'.format(duration)

import datetime

import dnstwister.tools


def test2():
    """Looooong domain names highlighted that the idna decoding is slooooow.

    This is a basic benchmark for performance, based on a bot's behaviour
    recently.
    """
    domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com'

    start = datetime.datetime.now()

    dnstwister.tools.fuzzy_domains(domain)

    duration = (datetime.datetime.now() - start).total_seconds()

    assert duration < 7, 'duration too long: {} secs'.format(duration)

Test threshold increased because the Travis server is a bit slower :)
Test threshold increased because the Travis server is a bit slower :)

  import datetime
  
  import dnstwister.tools
  
  
  def test2():
      """Looooong domain names highlighted that the idna decoding is slooooow.
  
-     This is a basic benchmark for performance.
+     This is a basic benchmark for performance, based on a bot's behaviour
+     recently.
      """
      domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com'
  
      start = datetime.datetime.now()
  
      dnstwister.tools.fuzzy_domains(domain)
  
      duration = (datetime.datetime.now() - start).total_seconds()
  
-     assert duration < 5, 'duration too long: {} secs'.format(duration)
+     assert duration < 7, 'duration too long: {} secs'.format(duration)
  
Test threshold increased because the Travis server is a bit slower :)
## Code Before:
import datetime

import dnstwister.tools


def test2():
    """Looooong domain names highlighted that the idna decoding is slooooow.

    This is a basic benchmark for performance.
    """
    domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com'

    start = datetime.datetime.now()

    dnstwister.tools.fuzzy_domains(domain)

    duration = (datetime.datetime.now() - start).total_seconds()

    assert duration < 5, 'duration too long: {} secs'.format(duration)

## Instruction:
Test threshold increased because the Travis server is a bit slower :)
## Code After:
import datetime

import dnstwister.tools


def test2():
    """Looooong domain names highlighted that the idna decoding is slooooow.

    This is a basic benchmark for performance, based on a bot's behaviour
    recently.
    """
    domain = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.zzzzzzzzzzzzzzzzzzzzzzzzzppieo.com'

    start = datetime.datetime.now()

    dnstwister.tools.fuzzy_domains(domain)

    duration = (datetime.datetime.now() - start).total_seconds()

    assert duration < 7, 'duration too long: {} secs'.format(duration)
