def test_create_duplicates(self): ''' Tests raise exception with trying to create duplicates. ''' configure_for_unittest() from model import Show from neomodel import UniqueProperty show1 = Show(title='House of Cards').save() show2 = Show(title='House of Cards') with self.assertRaises(UniqueProperty): show2.save()