Skip to content

Commit

Permalink
Updated backend tests. Closed #205
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubervila committed Nov 13, 2023
1 parent b146027 commit 29bc019
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions backend/core/test/test_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,15 @@ def test_product_serialized_format(self):
"uploaded_by": self.user.username,
"is_owner": True,
"can_delete": True,
"can_update": True,
"internal_name": self.product.internal_name,
"display_name": self.product.display_name,
"official_product": self.product.official_product,
"pz_code": self.product.pz_code,
"description": self.product.description,
"created_at": self.product.created_at.strftime("%Y-%m-%dT%H:%M:%S.%fZ"),
"status": self.product.status,
"updated_at": self.product.updated_at.strftime("%Y-%m-%dT%H:%M:%S.%fZ"),
}

response = self.client.get(self.url)
Expand Down
5 changes: 4 additions & 1 deletion backend/core/test/test_product_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from django.contrib.auth.models import User
from django.urls import reverse
from rest_framework.authtoken.models import Token
from rest_framework.test import APIRequestFactory, APITestCase, force_authenticate
from rest_framework.test import (APIRequestFactory, APITestCase,
force_authenticate)


class ProductFileListCreateAPIViewTestCase(APITestCase):
Expand Down Expand Up @@ -218,6 +219,8 @@ def test_product_file_serialized_format(self):
],
"size": self.product_file.file.size,
"extension": os.path.splitext(self.product_file.file.name)[1],
"created": self.product_file.created.strftime("%Y-%m-%dT%H:%M:%S.%fZ"),
"updated": self.product_file.updated.strftime("%Y-%m-%dT%H:%M:%S.%fZ"),
}

response = self.client.get(self.url)
Expand Down
3 changes: 0 additions & 3 deletions frontend/pages/product/edit/[pid].js
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,6 @@ export default function EditProduct() {
}
})
}
// onBlur={handleInputValue}
// error={!!fieldErrors.description}
// helperText={fieldErrors.description}
/>
</FormControl>
</Box>
Expand Down

0 comments on commit 29bc019

Please sign in to comment.