Exemplo n.º 1
0
    def test__model__template__create(self):
        actual_result = Template.create()

        self.assertRegex(actual_result.uuid,
                         r"[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}")
        mock.wrapper.session.add.assert_called_with(actual_result)
        mock.wrapper.session.commit.assert_called_with()
Exemplo n.º 2
0
 def test__model__template__create__different_uuid(self):
     first_element = Template.create().uuid
     second_element = Template.create().uuid
     self.assertNotEqual(first_element, second_element)