Beispiel #1
0
    def test_successful_execution(self):
        pc = ProductCheck.objects.create(name="Test", input_product_ids="Test")

        result = tasks.perform_product_check(product_check_id=pc.id)

        assert "status_message" in result
        assert ProductCheckEntry.objects.all().count() == 1
    def test_successful_execution(self):
        pc = ProductCheck.objects.create(name="Test", input_product_ids="Test")

        result = tasks.perform_product_check(product_check_id=pc.id)

        assert "status_message" in result
        assert ProductCheckEntry.objects.all().count() == 1
Beispiel #3
0
    def test_failed_execution(self):
        result = tasks.perform_product_check(product_check_id=9999)

        assert "error_message" in result
        assert ProductCheckEntry.objects.all().count() == 0
    def test_failed_execution(self):
        result = tasks.perform_product_check(product_check_id=9999)

        assert "error_message" in result
        assert ProductCheckEntry.objects.all().count() == 0