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_models.py 282B

12345678910
  1. import pytest
  2. from django.core import exceptions
  3. from oscar.apps.customer import models
  4. def test_communication_event_type_code_forbids_hyphens():
  5. ctype = models.CommunicationEventType(code="A-B")
  6. with pytest.raises(exceptions.ValidationError):
  7. ctype.full_clean()