Esempio n. 1
0
    def test_create(self):
        """
        Method for testing creation of categories
        :return: OK or ERROR
        """

        status_insert = self.test_category_controller.create()

        self.assertEqual(Status.status_successfully_inserted().__dict__,
                         status_insert)

        self.assertIsNotNone(self.test_category_controller.test_category.id)
Esempio n. 2
0
    def test_create(self):
        """
        Method for testing creation of film
        :return: OK or ERROR
        """
        db.session.add(self.test_category)
        db.session.commit()

        self.test_film_controller.test_film.test_category_id = \
            self.test_category.id

        status_insert = self.test_film_controller.create()

        self.assertEqual(Status.status_successfully_inserted().__dict__,
                         status_insert)

        self.assertIsNotNone(self.test_film_controller.test_film.id)