def setUp(self): self.domain = AllowedRange('2014-02-01', '2014-03-01', 'open', dtype=Date) self.accepted = [ '2014-02-15' ] self.rejected = [ '2014-02-01', Date.parse('2014-03-01'), Date.parse('2014-01-02')]
def setUp(self): vlist = ['2014-01-01', '2014-02-01', '2014-03-01'] self.domain = AllowedEnum(vlist, dtype=dt.date) self.accepted = [ vlist[1], Date.parse(vlist[0]) ] self.rejected = [ Date.parse('2014-01-02') ]