fix: Refactor

This commit is contained in:
2025-10-21 12:34:53 -05:00
parent 532dad0ce5
commit 5386355c7f
7 changed files with 21 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
from ..qr_generator import QRCodeGenerator
from qr_generator import QRCodeGenerator
def test_generate_qr():

View File

@@ -1,17 +1,13 @@
#!/usr/bin/env python3
from fastapi.testclient import TestClient
from ..main import app
from main import app
from tools import load_json
import json
client = TestClient(app)
def load_json(file_path):
with open(file_path, 'r') as filejson:
return json.load(filejson)
def test_print_bill():
test_info = {
"content": str(

View File

@@ -1,7 +1,7 @@
import unittest
from unittest.mock import patch, MagicMock
from escpos.printer import Dummy
from ..printer_factory import PrinterFactory
from printer_factory import PrinterFactory
class TestPrinterFactory(unittest.TestCase):
@@ -17,7 +17,7 @@ class TestPrinterFactory(unittest.TestCase):
printer = self.factory_dummy._get_printer()
self.assertIsInstance(printer, Dummy)
@patch('Api.printer_factory.Network')
@patch('printer_factory.Network')
def test_create_network_printer(self, mock_network):
"""Test creación de impresora de red con mock"""