def __init__(self): super(Site, self).__init__() self.court_id = self.__module__ d = date.today() self.url = 'http://mn.gov/lawlib/archive/sct{short_year}q{quarter}.html'.format( short_year=d.strftime("%y"), quarter=quarter(d.month) )
def test_quarter(self): answers = { 1: 1, 2: 1, 3: 1, 4: 2, 5: 2, 6: 2, 7: 3, 8: 3, 9: 3, 10: 4, 11: 4, 12: 4, } for month, q in answers.items(): self.assertEqual(quarter(month), q)
def test_quarter(self): answers = {1: 1, 2: 1, 3: 1, 4: 2, 5: 2, 6: 2, 7: 3, 8: 3, 9: 3, 10: 4, 11: 4, 12: 4} for month, q in answers.iteritems(): self.assertEqual(quarter(month), q)
def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.court_id = self.__module__ d = date.today() self.url = "http://mn.gov/lawlib/archive/cap{short_year}q{quarter}.html".format( short_year=d.strftime("%y"), quarter=quarter(d.month))
def __init__(self): super(Site, self).__init__() self.court_id = self.__module__ d = date.today() self.url = 'http://mn.gov/lawlib/archive/sct{short_year}q{quarter}.html'.format( short_year=d.strftime("%y"), quarter=quarter(d.month))