def setUpClass(cls) -> None:
     super().setUpClass()
     # Show some logging while testing, esp. with custom time and sourcecode info
     LogHelper.activate(level=clog.DEBUG)
     # Setup
     cls.shopHtmlResponsePath = TEST_BSTN_SHOP_HTML_RESPONSE.resolve()
     cls.productHtmlResponsePath = TEST_BSTN_PRODUCT_HTML_RESPONSE.resolve()
     # Download shop and product response if both not exist. This is a one-time-op.
     # Note that NetworkHelper is imported from integration tests.
     product = Product(
         url="https://www.bstn.com/en/adidas-zx-8000-ef4364-147994")
     shop = Shop(name="BSTN Shop Download Response",
                 url="https://www.bstn.com",
                 products=[product])
     netHelper = NetworkHelper()
     netHelper.downloadShopResponse(
         shop=shop,
         shopResponsePath=cls.shopHtmlResponsePath,
         productResponsePath=cls.productHtmlResponsePath)
 def setUpClass(cls) -> None:
     super().setUpClass()
     # Show some logging while testing, esp. with custom time and sourcecode info
     LogHelper.activate(level=clog.DEBUG)
     # Setup
     cls.shopHtmlResponsePath = TEST_SNEAKAVENUE_SHOP_HTML_RESPONSE.resolve(
     )
     cls.productHtmlResponsePath = TEST_SNEAKAVENUE_PRODUCT_HTML_RESPONSE.resolve(
     )
     # Download shop and product response if both not exist. This is a one-time-op.
     # Note that NetworkHelper is imported from integration tests.
     product = Product(
         url="https://www.sneak-a-venue.de/nike-air-max-95-se-white-229724")
     shop = Shop(name="Sneak-a-venue Shop Unit Test",
                 url="https://www.sneak-a-venue.de/",
                 products=[product])
     netHelper = NetworkHelper()
     netHelper.downloadShopResponse(
         shop=shop,
         shopResponsePath=cls.shopHtmlResponsePath,
         productResponsePath=cls.productHtmlResponsePath)
 def setUpClass(cls) -> None:
     super().setUpClass()
     # Show some logging while testing, esp. with custom time and sourcecode info
     LogHelper.activate(level=clog.DEBUG)
     # Setup
     cls.shopHtmlResponsePath = TEST_FOOTDISTRICT_SHOP_HTML_RESPONSE.resolve(
     )
     cls.productHtmlResponsePath = TEST_FOOTDISTRICT_PRODUCT_HTML_RESPONSE.resolve(
     )
     # Download shop and product response if both not exist. This is a one-time-op.
     # Note that NetworkHelper is imported from integration tests.
     product = Product(
         url="https://footdistrict.com/en/new-balance-w990-na5-w990na5.html"
     )
     shop = Shop(name="Footdistrict Shop Unit Test",
                 url="https://footdistrict.com",
                 products=[product])
     netHelper = NetworkHelper()
     netHelper.downloadShopResponse(
         shop=shop,
         shopResponsePath=cls.shopHtmlResponsePath,
         productResponsePath=cls.productHtmlResponsePath)
    def setUpClass(cls) -> None:
        super().setUpClass()
        # Show some logging while testing, esp. with custom time and sourcecode info
        LogHelper.activate(level=clog.DEBUG)
        # Setup
        cls.shopHtmlResponsePath = TEST_SOLEBOX_SHOP_HTML_RESPONSE.resolve()
        cls.productHtmlResponsePath = TEST_SOLEBOX_PRODUCT_HTML_RESPONSE.resolve(
        )
        # Download shop and product response if both not exist. This is a one-time-op.
        # Note that NetworkHelper is imported from integration tests.
        product = Product(
            url=
            "https://www.solebox.com/en_DE/p/adidas_consortium-craig_green_kontuur_ii-mgsogr%2Fmgsogr%2Fmgsogr-01800380.html"
        )
        shop = Shop(name="Solebox Shop Unit Test",
                    url="https://www.solebox.com",
                    products=[product])

        netHelper = NetworkHelper()
        netHelper.downloadShopResponse(
            shop=shop,
            shopResponsePath=cls.shopHtmlResponsePath,
            productResponsePath=cls.productHtmlResponsePath)
 def tearDownClass(cls):
     LogHelper.reset()
     del cls.shopHtmlResponsePath, cls.productHtmlResponsePath
     super().tearDownClass()
Example #6
0
 def tearDownClass(cls):
     LogHelper.reset()
     del cls.netHelper, cls.productsUrlsRepoMock
     super().tearDownClass()
Example #7
0
 def setUpClass(cls) -> None:
     super().setUpClass()
     cls.netHelper = NetworkHelper()
     cls.productsUrlsRepoMock = ProductsUrlsRepoMock()
     # Show some logging while testing, esp. with custom time and sourcecode info
     LogHelper.activate(level=clog.INFO)
 def tearDownClass(cls) -> None:
     LogHelper.reset()
     super().tearDownClass()
 def setUpClass(cls) -> None:
     super().setUpClass()
     LogHelper.activate(level=clog.DEBUG)