[#59] Add support for dateutil.parser dayfirst and yearfirst arguments
The WhoisEntry object should expose a dayfirst and yearfist argument to signify
how the datetime format for the TLD should be parsed by dateutil. The base
WhoisEntry class gives both those fields a value of False. Those are also the
default values dateutil assumes.
# coding=utf-8
import unittest
from whois.whois import NICClient
class TestNICClient(unittest.TestCase):
def setUp(self):
self.client = NICClient()
def test_choose_server(self):
domain = 'рнидс.срб'
chosen = self.client.choose_server(domain)
self.assertEqual(
chosen,
'срб'.decode('utf-8').encode('idna') + '.whois-servers.net'
)