You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_widgets.py 289B

12345678
  1. from oscar.forms.widgets import datetime_format_to_js_input_mask
  2. def test_js_input_mask():
  3. # Test all the possible input formats in one go
  4. fmt = '%Y-%m-%d %y %H:%M:%S %I'
  5. input_mask = datetime_format_to_js_input_mask(fmt)
  6. assert input_mask == 'yyyy-mm-dd yy HH:MM:ss hh'