Пример #1
0
 def test_person_without_source(self):
     person_email = functools.partial(generate_person_email,
                                      domain='osis.org')
     p = PersonWithoutUserFactory.build(
         email=factory.LazyAttribute(person_email), source=None)
     with self.assertDontRaise():
         p.save()
Пример #2
0
 def test_person_from_extern_source(self):
     person_email = functools.partial(generate_person_email,
                                      domain='osis.org')
     p = PersonWithoutUserFactory.build(
         email=factory.LazyAttribute(person_email),
         source=person_source_type.DISSERTATION)
     with self.assertRaises(AttributeError):
         p.save()