From 885ad74d0f7fc34e904c21c6a2d8ce53ac9e4ded Mon Sep 17 00:00:00 2001 From: Shane Jaroch Date: Fri, 19 Apr 2024 13:39:11 -0400 Subject: [PATCH] fix test? --- tests/test_cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index b292a2e..04870c5 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -12,6 +12,7 @@ import datetime import os import sys import unittest +from unittest.mock import patch import pytest @@ -293,9 +294,10 @@ class TestCli(unittest.TestCase): assert isinstance(result, list) args = arg_parser.parse_args(args="bug report".split()) - code, result = args.func(args) + with patch("ntclient.services.bugs.submit_bugs", return_value=1): + code, result = args.func(args) assert code == 0 - assert isinstance(result, int) + assert result == 1 def test_415_invalid_path_day_throws_error(self): """Ensures invalid path throws exception in `day` subcommand""" -- 2.52.0