mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
parent
3ea044fb59
commit
a3d1b17559
@ -1525,6 +1525,8 @@ class AccessTime(Str):
|
|||||||
index = self._check_Y_spec(ts, 2)
|
index = self._check_Y_spec(ts, 2)
|
||||||
elif ts[1] == 'monthly':
|
elif ts[1] == 'monthly':
|
||||||
index = self._check_M_spec(ts, 2)
|
index = self._check_M_spec(ts, 2)
|
||||||
|
elif ts[1] == 'weekly':
|
||||||
|
index = self._check_W_spec(ts, 2)
|
||||||
elif ts[1] == 'daily':
|
elif ts[1] == 'daily':
|
||||||
index = 1
|
index = 1
|
||||||
if index is None:
|
if index is None:
|
||||||
|
@ -1372,19 +1372,18 @@ class test_AccessTime(ClassChecker):
|
|||||||
for value in (u'absolute 201012161032 ~ 201012161033',
|
for value in (u'absolute 201012161032 ~ 201012161033',
|
||||||
u'periodic monthly week 2 day Sat,Sun 0900-1300',
|
u'periodic monthly week 2 day Sat,Sun 0900-1300',
|
||||||
u'periodic yearly month 4 day 1-31 0800-1400',
|
u'periodic yearly month 4 day 1-31 0800-1400',
|
||||||
|
u'periodic weekly day 7 0800-1400',
|
||||||
u'periodic daily 0800-1400',
|
u'periodic daily 0800-1400',
|
||||||
):
|
):
|
||||||
assert rule(dummy, value) is None
|
assert rule(dummy, value) is None
|
||||||
assert dummy.called() is False
|
assert dummy.called() is False
|
||||||
|
|
||||||
# FIXME, weekly is not implemented in AccessTime
|
|
||||||
# u'periodic weekly day 8 0800-1400',
|
|
||||||
|
|
||||||
# And some bad ones
|
# And some bad ones
|
||||||
for value in (u'absolute 201012161032 - 201012161033',
|
for value in (u'absolute 201012161032 - 201012161033',
|
||||||
u'absolute 201012161032 ~',
|
u'absolute 201012161032 ~',
|
||||||
u'periodic monthly day Sat,Sun 0900-1300',
|
u'periodic monthly day Sat,Sun 0900-1300',
|
||||||
u'periodical yearly month 4 day 1-31 0800-1400',
|
u'periodical yearly month 4 day 1-31 0800-1400',
|
||||||
|
u'periodic weekly day 8 0800-1400',
|
||||||
):
|
):
|
||||||
e = raises(ValidationError, o._rule_required, None, value)
|
e = raises(ValidationError, o._rule_required, None, value)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user