Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/431 allocation tests #2618

Merged
merged 5 commits into from
Jan 3, 2025
Merged

Chore/431 allocation tests #2618

merged 5 commits into from
Jan 3, 2025

Conversation

shon-button
Copy link
Contributor

@shon-button shon-button commented Dec 18, 2024

Frontend and Backend tests for Allocation of Emissions

  • Also some minor changes to the Allocation model to bring its constraints in line with similar models

@shon-button shon-button force-pushed the chore/431-allocation-tests branch from 2761dbb to 33397bd Compare December 18, 2024 20:39
product_id=29, # "Sugar: solid"
)

self.mock_get_response = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sepehr-Sobhani @pbastia any thoughts on ways we could possibly cut down on the size of the mocked get repsonse / post payloads in this file? This service returns/ingests a pretty large object

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a class or function to generate the data objects not being tested (ie: where allocated emissions are 0)?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dleard I think this is something that will be improved when we decouple the service return types from the API schemas. Using the API data types here forces us to use those large JSON objects, whereas we could use data structures much simpler or easy to manipulate for the service use case

@acatchpole acatchpole force-pushed the chore/431-allocation-tests branch from 391d031 to f5fdf69 Compare December 31, 2024 16:43
@acatchpole acatchpole force-pushed the chore/431-allocation-tests branch 4 times, most recently from a540261 to 5c0d345 Compare January 3, 2025 17:54
@acatchpole acatchpole force-pushed the chore/431-allocation-tests branch from 5c0d345 to c3e5ae7 Compare January 3, 2025 17:56
@acatchpole acatchpole merged commit 91f80e9 into develop Jan 3, 2025
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants