示例#1
0
文件: minn.py 项目: enyst/juriscraper
 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)
示例#3
0
 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)
示例#4
0
 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))
示例#5
0
 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))