Exemple #1
0
    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()
Exemple #2
0
    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()