コード例 #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
コード例 #2
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
コード例 #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
コード例 #4
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