Exemple #1
0
 def test_registry_3(self):
     registry = DatePeriodRegistry(MinutesPeriod, HoursPeriod)
     field = DatePeriodField()
     field.period_registry = registry
     self.assertEqual(list(registry.choices()), list(field.choices))
Exemple #2
0
 def test_registry_3(self):
     registry = DatePeriodRegistry(MinutesPeriod, HoursPeriod)
     field = DatePeriodField()
     field.period_registry = registry
     self.assertListEqual([*registry.choices()], [*field.choices])
Exemple #3
0
 def test_registry_2(self):
     registry = DatePeriodRegistry(MinutesPeriod, HoursPeriod)
     self.assertEqual(
         list(registry.choices()),
         list(DatePeriodField(period_registry=registry).choices))
Exemple #4
0
 def test_registry_2(self):
     registry = DatePeriodRegistry(MinutesPeriod, HoursPeriod)
     self.assertListEqual(
         [*registry.choices()],
         [*DatePeriodField(period_registry=registry).choices]
     )