2 Commits

Author SHA1 Message Date
db83438bae Added lazy loading to product images 2024-02-26 08:04:11 +00:00
7dbdcdcd4f Made test teardown reset environment variables 2024-02-25 14:49:32 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
<a href="{{ url_for('main.products.product', id=product.id) }}" class="product product-link">
<div class="product-title">{{product.name}}</div>
<div class="product-content-container">
<img class="product-image-preview" src="{{ url_for('static', filename='assets/img/products/' + product.image) }}" alt="Brake Disks" />
<img class="product-image-preview" src="{{ url_for('static', filename='assets/img/products/' + product.image) }}" alt="Brake Disks" loading="lazy"/>
<div class="product-details">
<div class="product-price">£{{product.cost}}</div>

View File

@@ -26,7 +26,7 @@ class TestBase:
def teardown_class(self):
""" Teardown class level resources or configurations """
pass
os.environ["ENVIRON"] = self.old_env
@pytest.fixture(scope="class")
def test_client(self) -> FlaskClient: