generated from Code-Institute-Org/ci-full-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathissues.json
1 lines (1 loc) · 341 KB
/
issues.json
1
[{"body":"**Steps to reproduce**\r\n1. Use the following Python PEP8 checker: https://pep8ci.herokuapp.com/\r\n2. Run any test_*.py file through the PEP8 checker.\r\n\r\n**Expected results**\r\nNo Python linting errors are shown.\r\n\r\n**Actual results**\r\nA combination of the following errors are shown:\r\n- E302 expected 2 blank lines, found 1\r\n- E501 line too long\r\n- W293 blank line contains whitespace\r\n- W292 no newline at end of file\r\n- W291 trailing whitespace","comments":[{"id":"IC_kwDOJVY7Ys5zQkSy","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved all linting issues in test files.","createdAt":"2024-02-08T09:57:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/242#issuecomment-1933722802","viewerDidAuthor":true}],"number":242,"title":"All test scripts contain PEP8 compliance errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/242"},{"body":"**Steps to reproduce**\r\n1. Use the following Python PEP8 checker: https://pep8ci.herokuapp.com/\r\n2. Run any of the following files for any app through the PEP8 checler: views, services, models, forms, admin, signals, apps.\r\n\r\n**Expected results**\r\nNo Python linting errors are shown.\r\n\r\n**Actual results**\r\nA combination of the following errors are shown:\r\n- E302 expected 2 blank lines, found 1\r\n- E501 line too long\r\n- W293 blank line contains whitespace\r\n- W292 no newline at end of file\r\n- E266 too many leading '#' for block comment\r\n- W291 trailing whitespace","comments":[{"id":"IC_kwDOJVY7Ys5zQj0h","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved all linting errors for all custom application files.","createdAt":"2024-02-08T09:56:00Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/241#issuecomment-1933720865","viewerDidAuthor":true}],"number":241,"title":"All application Python files containing similar linting issues","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/241"},{"body":"FAILED subscriptions_api/test_views.py::test_post_subscription_with_null_data - NameError: name 'ValidationError' is not defined\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_null_user_id - NameError: name 'ValidationError' is not defined\r\nFAILED subscriptions_api/test_views.py::test_patch_subscription_with_null_subscription_option_id - NameError: name 'ValidationError' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5zN3vQ","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added import for ValidationError","createdAt":"2024-02-07T22:06:10Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/240#issuecomment-1933016016","viewerDidAuthor":true}],"number":240,"title":"Multiple view tests for subscription API failing with NameError \"ValidationError\"","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/240"},{"body":"**Steps to reproduce**\r\n1. Delete all questions from the database\r\n2. Create a tax calculation\r\n\r\n**Expected result**\r\nThe jurisdiction form should not allow the form to be submitted if there are no things.\r\n\r\n**Actual result**\r\nThe form can be submitted with no questions. and no data. An empty calculation result page is then displayed. When the calculation is displayed on the dashboard, an error is shown.","comments":[{"id":"IC_kwDOJVY7Ys5zBFJi","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added code to count the number of questions available to the form as a whole and display a message if no questions are available.","createdAt":"2024-02-06T13:45:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/239#issuecomment-1929663074","viewerDidAuthor":true}],"number":239,"title":"Tax calculator allows for the creation of calculations if there are no questions configured for the selected jurisdictions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/239"},{"body":"**Steps to reproduce**\r\n1. Edit any tiered rate or secondary tiered rate rule\r\n2. Edit or create a tier in the dialog, or cancel the dialog\r\n3. Attempt to save the rule\r\n\r\n**Expected results**\r\nThe rule should save correctly\r\n\r\n**Actual results**\r\nThe following error is thrown: \"cannot read properties of null (reading 'id')\".","comments":[{"id":"IC_kwDOJVY7Ys5y7ZhG","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The logic to move the app state to the parent state was unexpectedly clearing the parent ruleset in the config app. Removed the offending line.","createdAt":"2024-02-05T22:01:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/238#issuecomment-1928173638","viewerDidAuthor":true}],"number":238,"title":"Saving rule after exiting rule tier dialog throws error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/238"},{"body":"**Steps to reproduce**\r\n\r\n1. Go to the basic admin app\r\n2. Create a new jurisdiction\r\n\r\n**Expected result**\r\nA form for the new jurisdiction will have been created\r\n\r\n**Actual result**\r\nNo form is created","comments":[{"id":"IC_kwDOJVY7Ys5yg2S9","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"No signal existed to connect delete jurisdiction events to the delete form service. Added this signal to the forms api.","createdAt":"2024-02-01T12:27:38Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/236#issuecomment-1921213629","viewerDidAuthor":true}],"number":236,"title":"Form for jurisdiction is not being created when a new jurisdiction is added","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/236"},{"body":"**Steps to reproduce**\r\n\r\n1. Create a tiered rate rule rule\r\n2. Create a secondary tiered rate rule with the rule from step (1) as the primary\r\n3. Delete the tiered rate rule\r\n\r\n**Expected results**\r\nAn error should be displayed and the rule should not be deleted\r\n\r\n**Actual results**\r\nThe config app attempts to delete the rule, resulting in a violation of a foreign key constraint","comments":[{"id":"IC_kwDOJVY7Ys5yX5YC","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a validation step to check if a rule has dependents before deleting it, and to display an error if this is the case.","createdAt":"2024-01-31T10:54:45Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/235#issuecomment-1918866946","viewerDidAuthor":true}],"number":235,"title":"Config app allows primary rules to be deleted that have secondary rule which depend on them","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/235"},{"body":"**Steps to reproduce**\r\n\r\n1. Choose to delete any item\r\n2. Cancel the confirmation box\r\n\r\n**Expected results**\r\nFor questions, rulesets and rules the app state should be cleared after cancelling the confirmation box. For rule tiers or multiple choice options, the parent state should be moved back to the dialog state.\r\n\r\n**Actual results**\r\nThe app state is left in the delete state.","comments":[{"id":"IC_kwDOJVY7Ys5yloHP","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a function to manage state correctly on confirmation dialog cancellation, based on the entity type in the app state. Set this as the event handler for the dialog's onclick event.","createdAt":"2024-02-01T23:24:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/234#issuecomment-1922466255","viewerDidAuthor":true}],"number":234,"title":"App state is not being correctly managed when cancelling a delete confirmation dialog","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/234"},{"body":"When creating or editing secondary rule tiers, duplicated primary rule tiers are shown in the select box.","comments":[{"id":"IC_kwDOJVY7Ys5yUfz8","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Selects were not being cleared before being refreshed. Added code to clear selects before refreshing.","createdAt":"2024-01-30T22:06:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/233#issuecomment-1917975804","viewerDidAuthor":true}],"number":233,"title":"Primary rule tiers are duplicated in the primary rule tier select","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/233"},{"body":"Cancelling any create or edit dialog box fails to correctly manage the app state. This causes particular problems when creating/editing child nodes. This is because when a child dialog box is loaded (e.g., options/rule tiers), the parent entity is moved to the parent state. If the child dialog is then cancelled, the app state will be incorrect preventing data from being updated correctly.","comments":[{"id":"IC_kwDOJVY7Ys5yTkOD","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added code to prevent create and edit dialogs from closing when the user clicks outside of the dialog. Added a JavaScript event handler to all dialogs to correctly manage app state when cancelling the dialog.","createdAt":"2024-01-30T19:22:55Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/232#issuecomment-1917731715","viewerDidAuthor":true}],"number":232,"title":"App state is incorrect after cancelling any create/edit dialog box","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/232"},{"body":"**Steps to reproduce**\r\n\r\n1. Create a tiered rate rule or secondary tiered rate rule\r\n2. Add two rule tiers to the newly created rule\r\n3. Refresh the browser\r\n4. Delete both rules\r\n\r\n**Expected results**\r\nThe rule tier is successfully deleted and the rule tier display is updated accordingly\r\n\r\n**Actual result**\r\nThe rule tier is updated resulting in a 404 error, since it has been deleted","comments":[{"id":"IC_kwDOJVY7Ys5yStnK","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was not limited to rule tiers but also affected multiple choice options. The error occurred as follows. Deletion of child nodes (rule tiers/options) can only be done through the parent rule/question dialog. The user first accesses the dialog which puts the parent into the app state. They then perform an action (create/update/delete) on a child of the parent which moves the parent into the parent state and puts the child into the app state. After the action on the child has been completed, the app state's read copy of the data is updated with the latest data from the API and displays are refreshed. However, the original copy of the parent remains in the dialog state so that there is now a pre-update and a post-update copy of the parent. When the second delete is then performed, the ordinal resequencing process uses the copy of the parent from the app state which still holds a reference to the first item to have been deleted causing the issue above.\r\n\r\nThis was resolved by ensuring that whenever the app state's referential data is updated, the dialog/parent states are updated with the latest data too.","createdAt":"2024-01-30T17:08:30Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/231#issuecomment-1917508042","viewerDidAuthor":true}],"number":231,"title":"Deleting the last rule tier or secondary rule tier for a given rule causes failure to save rule tier","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/231"},{"body":"When saving a rule tier, the dialog is not necessarily shown in the foreground (other dialogs stack above it).","comments":[{"id":"IC_kwDOJVY7Ys5yP1Kk","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Reordered the dialogs in the HTML template with parent dialogs at the bottom and child dialogs on top.","createdAt":"2024-01-30T12:36:18Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/230#issuecomment-1916752548","viewerDidAuthor":true}],"number":230,"title":"Rule tier save dialog not shown at top of screen","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/230"},{"body":"The add tier button should be hidden to prevent tiers being added before the rule has been created in the database. This would cause an integrity error since rule tiers have foreign keys to rules.","comments":[{"id":"IC_kwDOJVY7Ys5yUO5g","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the initialisation functions for multiple choice question, tiered rate rule and secondary rate rule dialogs to hide the tier/options tables when in create mode and show them when in edit mode.","createdAt":"2024-01-30T21:15:04Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/229#issuecomment-1917906528","viewerDidAuthor":true}],"number":229,"title":"Add tier button displays when creating tiered rate and secondary tiered rate rules","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/229"},{"body":"**Steps to reproduce** \r\n\r\n1. Create and save a primary rule tier in the config app\r\n\r\n**Expected results**\r\nThe rule will be saved and a success message will be displayed.\r\n\r\n**Actual results**\r\nThe following error is displayed in the Javascript console: \"TypeError: cannot read properties of null (reading 'id')\"","comments":[{"id":"IC_kwDOJVY7Ys5yS6rC","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This is caused by the following bug: [App state is incorrect after cancelling any create/edit dialog box](https://github.com/Laura10101/contractor-tax-calculator/issues/232)","createdAt":"2024-01-30T17:38:57Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/228#issuecomment-1917561538","viewerDidAuthor":true}],"number":228,"title":"TypeError when saving primary rule tier in config app","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/228"},{"body":"Pressing any move up/move down icon on the config app fails to update anything","comments":[{"id":"IC_kwDOJVY7Ys5yUKAh","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"When moving a question up or down, the process involves swapping the ordinals of the question for which the button was clicked and the one above or below it. Ones the ordinals have been swapped, both questions are updated to save their new ordinals via the API. The latest data is then retrieved from the API and the display is refreshed. However, because the updates execute asynchronously, the refresh was being called (and completing) before the two updates had completed. As a result, the display was being refreshed before the data had been updated and so the display was not updating. This was resolved by using JQuery when() and then() to wait until both updates had completed before refreshing the display.","createdAt":"2024-01-30T21:01:26Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/227#issuecomment-1917886497","viewerDidAuthor":true}],"number":227,"title":"Move up/down buttons on config app is not working","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/227"},{"body":"New questions can be created with the same variable name as that of an existing question.","comments":[{"id":"IC_kwDOJVY7Ys5yYpdR","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added validation to all dialog boxes in the config app","createdAt":"2024-01-31T13:02:56Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/226#issuecomment-1919063889","viewerDidAuthor":true}],"number":226,"title":"Config app allows duplicate variable names when creating questions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/226"},{"body":"Rules use variable names to determine which form field to get their data from. The variable name used for a rule must, therefore, correspond to a valid variable name from an existing question. Currently, the config app allows unvalidated variable names to be entered as free text.","comments":[{"id":"IC_kwDOJVY7Ys5yaMOB","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated all rule dialog boxes with select box to allow users to choose rather than input the data source for a rule","createdAt":"2024-01-31T16:31:34Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/225#issuecomment-1919468417","viewerDidAuthor":true}],"number":225,"title":"Config app allows user to enter non-existent variable names when defining rules","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/225"},{"body":"**Steps to reproduce**\r\n\r\n1. Log into the contractor app\r\n2. Go to create a tax calculation\r\n3. Select France as the jurisdiction\r\n4. Follow the remaining process\r\n\r\n**Expected results**\r\nA line in the calculation results tables should be displayed for each rule\r\n\r\n**Actual result**\r\nOnly one rule result is displayed","comments":[{"id":"IC_kwDOJVY7Ys5yPbTp","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Not a bug. This was due to the fact that the tiered rate and secondary tiered rate rules for France had no tiers defined.","createdAt":"2024-01-30T11:31:46Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/224#issuecomment-1916646633","viewerDidAuthor":true}],"number":224,"title":"Only one rule displaying for French calculation","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/224"},{"body":"When an API error (e.g., a validation error) occurs in the config app, the error message is not displayed as part of the failure status dialog","comments":[{"id":"IC_kwDOJVY7Ys5yS3uW","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added code to extract the error message returned by the API from the response and concatenate this to the error message where it exists.","createdAt":"2024-01-30T17:31:41Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/223#issuecomment-1917549462","viewerDidAuthor":true}],"number":223,"title":"API error messages not displayed in failure dialogs in config app","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/223"},{"body":"After submitting the checkout form, a 404 error is displayed","comments":[{"id":"IC_kwDOJVY7Ys5yId-u","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The confirm checkout view was redirecting to the incorrect URL. Updated the url.","createdAt":"2024-01-29T14:36:27Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/222#issuecomment-1914822574","viewerDidAuthor":true}],"number":222,"title":"Submitting checkout form results in 404","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/222"},{"body":"**Steps to reproduce**\r\n1. Create a question against any jurisdiction\r\n2. Create a rule against the same jurisdiction and set the variable name to match that of the question created in step 1\r\n3. Delete the question\r\n\r\n**Expect result**\r\nThe config app should display an error message and prevent the user from deleting the question\r\n\r\n**Actual result**\r\nThe question is deleted. As a result, the question will not be displayed in the jurisdiction form but the rule will still attempt to calculate, resulting in a ValidationError","comments":[{"id":"IC_kwDOJVY7Ys5yX5An","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a validation check to prevent questions from being deleted if they have dependent rules, and display an error to the user.","createdAt":"2024-01-31T10:53:48Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/221#issuecomment-1918865447","viewerDidAuthor":true}],"number":221,"title":"Config app allows question to be deleted without deleting rules that rely on that questions' variable name first","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/221"},{"body":"The jurisdiction form can be submitted without validating numeric data.","comments":[{"id":"IC_kwDOJVY7Ys5yOQf3","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added validation to the jurisdiction form.","createdAt":"2024-01-30T08:45:53Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/220#issuecomment-1916340215","viewerDidAuthor":true}],"number":220,"title":"Contractor app allows the jurisdiction forms to be submitted with invalid data","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/220"},{"body":"When selecting jurisdictions in the contractor app, before creating a calculation, it is possible to submit the form without selecting any jurisdictions.","comments":[{"id":"IC_kwDOJVY7Ys5yLZGj","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added validation logic to disable the submit button unless at least one checkbox is selected.","createdAt":"2024-01-29T21:18:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/219#issuecomment-1915589027","viewerDidAuthor":true}],"number":219,"title":"Select jurisdiction form allows submission without any jurisdictions selected","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/219"},{"body":"**Steps to reproduce**\r\n1. Login to contractor app with a user who has an active subscription (complete subscription process if not done)\r\n2. Click the \"Create a calculation\" link in the header bar\r\n3. Select jurisdictions and click \"next\"\r\n\r\n**Expected result**\r\nThe forms for the selected jurisdictions will be displayed.\r\n\r\n**Actual result**\r\nThe following error is displayed:\r\n_VariableDoesNotExist at /contractors/calculations/form\r\nFailed lookup for key [system_name] in {'id': 1, 'text': 'test option', 'explainer': 'a nice test option'}_","comments":[{"id":"IC_kwDOJVY7Ys5yIFCG","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The jurisdiction form template was referencing system_name rather than variable_name. Updated the template to use variable_name instead.","createdAt":"2024-01-29T13:42:04Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/218#issuecomment-1914720390","viewerDidAuthor":true}],"number":218,"title":"VariableDoesNotExist after selecting jurisdictions before creating calculation","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/218"},{"body":"The following tests are timing out:\r\n\r\n● Status views › Success views › Successfully saving › Questions › should display a success message, clear the app state, and refresh the appropriate display components\r\n● Status views › Success views › Successfully saving › Multiple choice options › should display a success message, move the parent state to the app state, and refresh the appropriate display components\r\n● Status views › Success views › Successfully saving › Rulesets › should display a success message, clear the app state, and refresh the appropriate display components\r\n● Status views › Success views › Successfully saving › Rules › should display a success message, clear the app state, and refresh the appropriate display components\r\n● Status views › Success views › Successfully saving › Rule tiers › should display a success message, clear the app state, and refresh the appropriate display components\r\n● Status views › Success views › Successfully saving › Rule tiers › should display a success message, clear the app state, and refresh the appropriate display components\r\n● Question views › Deleting questions › Confirming deletion › should hide confirmation dialog and trigger DELETE request\r\n● Multilple choice option views › Creating multiple choice options › should hide the create option dialog and generate an appropriate request for an option\r\n● Multilple choice option views › Deleting multiple choice options › Confirming deletion › should hide confirmation dialog and trigger DELETE request\r\n● Ruleset views › Creating rulesets › should hide the create ruleset dialog and generate an appropriate request for a ruleset\r\n● Ruleset views › Deleting rulesets › Confirming deletion › should hide confirmation dialog and trigger DELETE request\r\n● Ruleset views › Deleting rulesets › Successful deletion › should show a success message, resequence ordinals, clear the app state, and refresh the rulesets display\r\n● Rule views views › Deleting rules › Confirming deletion › should hide confirmation dialog and trigger DELETE request\r\n● Rule views views › Deleting rules › Successful deletion › of a flat rate rule › should show a success message, resequence ordinals, clear the app state, and refresh the rules display\r\n● Rule views views › Deleting rules › Successful deletion › of a tiered rate rule › should show a success message, resequence ordinals, clear the app state, and refresh the rules display\r\n● Rule views views › Deleting rules › Successful deletion › of a secondary tiered rate rule › should show a success message, resequence ordinals, clear the app state, and refresh the rules display\r\n● Rule tier views views › Deleting rule tiers › Successful deletion › of a rule tier › should show a success message, resequence ordinals, clear the app state, and refresh the tiers display\r\n● Rule tier views views › Deleting rule tiers › Successful deletion › of a rule tier › should show a success message, resequence ordinals, clear the app state, and refresh the tiers display\r\n● Rule tier views views › Deleting rule tiers › Successful deletion › of a secondary rule tier › should show a success message, resequence ordinals, clear the app state, and refresh the tiers display\r\n● Rule tier views views › Deleting rule tiers › Successful deletion › of a secondary rule tier › should show a success message, resequence ordinals, clear the app state, and refresh the tiers display","comments":[{"id":"IC_kwDOJVY7Ys5yEV21","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"In order to make views testable, parameters were added to allow refresher, creator and updater methods to be passed in as parameters. However, for views which handle AJAX requests, the standard AJAX response parameters had not been declared in all cases meaning that the views did not correctly receive the callback functions when accessing the config app through the browser. The standard AJAX parameters were then added, but this caused the above tests to fail as they were not passing the additional parameters in. Updated the tests to pass in all parameters.","createdAt":"2024-01-28T22:21:39Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/217#issuecomment-1913740725","viewerDidAuthor":true}],"number":217,"title":"Multiple Jest views tests for the config app are timing out","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/217"},{"body":"After selecting a subscription option, the following error is displayed:\r\n\r\n\"AttributeError at /contractors/checkout/\r\n'str' object has no attribute 'user'\"","comments":[{"id":"IC_kwDOJVY7Ys5yEJt7","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was caused by decorating two helper methods in the checkout views module with the @login_required decorator. Removed the decorator.","createdAt":"2024-01-28T19:00:29Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/216#issuecomment-1913691003","viewerDidAuthor":true}],"number":216,"title":"\"str object has no attribute 'user'\" on checkout page","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/216"},{"body":"**Steps to reproduce**\r\n\r\n1. Logout of all accounts\r\n2. While logged out, access any of the contractor URLs (/contractor/subscription/ or /contractor/home/ or /contractor/checkout/ or /contractor/calculations/)\r\n\r\n**Expected result**\r\nThe user will be redirected back to the index page\r\n\r\n**Actual result**\r\nThe user is allowed to view the page","comments":[{"id":"IC_kwDOJVY7Ys5yD63z","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added the @login_required decorator to all contractor views.","createdAt":"2024-01-28T15:16:36Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/215#issuecomment-1913630195","viewerDidAuthor":true}],"number":215,"title":"Able to access secure contractor pages while logged out","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/215"},{"body":"**Steps to reproduce**\r\n1. Access the checkout page directly through a browser at /contractors/checkout/\r\n\r\n**Expected result**\r\nThe user should be redirected to the subscription page\r\n\r\n**Actual result**\r\nThe following error is displayed:\r\nint() argument must be a string, a bytes-like object or a real number, not 'NoneType'","comments":[{"id":"IC_kwDOJVY7Ys5yLS_v","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"When accessing the checkout page directly, no data had been posted from the subscription options form. Added a line of defensive code to redirect to the subscription options page if the request method is not POST.","createdAt":"2024-01-29T21:04:44Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/214#issuecomment-1915564015","viewerDidAuthor":true}],"number":214,"title":"Accessing checkout app directly throws int() argument must be a string, not NoneType","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/214"},{"body":"When a significant number of questions, rules or tiers have been added against a single jurisdiction, ruleset, or rule respectively, then deleting an entity causes the following error:\r\n\r\nFATAL: too many connections for role \"mqrlkcwy\"","comments":[{"id":"IC_kwDOJVY7Ys5yC10q","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Deleting any of the objects above causes rulesets to be resequenced. This involves updating the ordinal on each question which was not deleted to ensure they remain sequential. Each request is sent asynchronously, allowing for multiple requests to be sent in parallel. Consequently, where there is a large number of entities to be resequenced, the number of requests sent in parallel may exceed the number of allowed connections.","createdAt":"2024-01-27T22:00:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/213#issuecomment-1913347370","viewerDidAuthor":true}],"number":213,"title":"Deleting entities results in a database error: too many connections","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/213"},{"body":"**Steps to reproduce**\r\n1. Load the config app\r\n2. Perform any create, update, or delete action\r\n\r\n**Expected results**\r\nThe corresponding display component will refresh to show the latest data.\r\n\r\n**Actual results**\r\nAn error is thrown explaining that the refresher function \"is not a function\"","comments":[{"id":"IC_kwDOJVY7Ys5yGr-Y","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The callback from AJAX requests includes three default parameters (data, textStatus, and request). However, the success callbacks only defined parameters to receive refresher, updater and creator functions as appropriate. The AJAX requests were therefore passing the data, textStatus and request values into the refresher/updater/creator parameters. Added in the default AJAX parameters before the refresher/updater/creator parameters, allowing the AJAX parameters to be correctly populated without overriding the values of the creators/refreshers/updaters.","createdAt":"2024-01-29T10:04:07Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/212#issuecomment-1914355608","viewerDidAuthor":true}],"number":212,"title":"refreshers are \"not a function\" when config app API requests successfully complete","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/212"},{"body":"When loading the config app in any browser, a JavaScript error is thrown: '\"module\" is undefined'.","comments":[{"id":"IC_kwDOJVY7Ys5yCzwZ","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This is caused by the module exports and the require statements that were added to the script files for the config app to enable automated testing. The issue was resolved by wrapping the require and export statements in code to check whether \"module\" is defined. Since this places the require statements into a block, the constants that functions and objects are imported into are not available outside of the block. The modules are therefore loaded into a constant, and the relevant bits of each module are then loaded into global variables to allow for a consistent experience in automated testing and within the browser.","createdAt":"2024-01-27T21:19:43Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/211#issuecomment-1913338905","viewerDidAuthor":true}],"number":211,"title":"\"Module\" not defined when loading config app in browser","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/211"},{"body":"● Multilple choice option views › Creating multiple choice options › should hide the create option dialog and generate an appropriate request for an option\r\n Expected: \"Test option\"\r\n Received: \"\"\r\n 1410 | expect(_formId).toBe(getFormId());\r\n 1411 | expect(_questionId).toBe(question.id);\r\n > 1412 | expect(_name).toBe(name);\r\n | ^","comments":[{"id":"IC_kwDOJVY7Ys5yCIDB","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Initialising the multiple choice option sets the inner text on the name input rather than the value of the input. As a result, the save view is unable to correctly read the value. Updated the initialisation method to set value.","createdAt":"2024-01-27T13:44:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/210#issuecomment-1913159873","viewerDidAuthor":true}],"number":210,"title":"Name is null when saving multiple choice option","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/210"},{"body":" ● Status views › Success views › Successfully saving › Multiple choice options › should display a success message, move the parent state to the app state, and refresh the appropriate display components\r\n Expected: \"edit\"\r\n Received: \"create\"\r\n 501 |\r\n 502 | // Check app state\r\n > 503 | expect(app.dialogState.mode).toBe(dialogStates.modes.edit);\r\n\r\n● Status views › Success views › Successfully saving › Rule tiers › should display a success message, clear the app state, and refresh the appropriate display components\r\n Expected: \"edit\"\r\n Received: \"create\"\r\n 571 |\r\n 572 | // Check app state\r\n > 573 | expect(app.dialogState.mode).toBe(dialogStates.modes.edit);","comments":[{"id":"IC_kwDOJVY7Ys5yB9pP","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The success views were not managing the app state. Added code to move the parent state to the app state once the save is successful. This is necessary because rule tiers and multiple choice options can only be updated while accessing the parent question or rule respectively.","createdAt":"2024-01-27T11:03:28Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/209#issuecomment-1913117263","viewerDidAuthor":true}],"number":209,"title":"Success view when saving multiple choice options or rule tiers fails to handle app state correctly","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/209"},{"body":" ● Rule tier views views › Reordering rule tiers › Moving the bottom rule tier down › should do nothing\r\n Expected done to be called once, but it was called multiple times.\r\n\r\n● Rule tier views views › Reordering rule tiers › Moving the top rule tier up › should do nothing\r\n Expected done to be called once, but it was called multiple times.","comments":[{"id":"IC_kwDOJVY7Ys5yB5w2","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"When swapping rule tier ordinals, the refresher is being called even if no update is made. Updated swapRuleTierOrdinals to only refresh the rule tiers display if an update has been made.","createdAt":"2024-01-27T09:57:00Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/208#issuecomment-1913101366","viewerDidAuthor":true}],"number":208,"title":"Moving top rule tier up and bottom rule tier down fails tests","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/208"},{"body":"● Question views › Deleting questions › Successful deletion › should show a success message, resequence ordinals, clear the app state, and refresh the questions display\r\n Expected: 3\r\n Received: 2\r\n 770 | function checkOrdinalUpdate(question, success, failure) {\r\n 771 | console.log(\"Expected ordinal=\" + nextOrdinal + \", actual=\" + question.ordinal);\r\n > 772 | expect(question.ordinal).toBe(nextOrdinal);\r\n | ^","comments":[{"id":"IC_kwDOJVY7Ys5yAwRL","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The deleted question was being updated after deletion, causing an additional question to be included in the resequence. Added a check to exclude the deleted question.","createdAt":"2024-01-26T22:55:04Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/207#issuecomment-1912800331","viewerDidAuthor":true}],"number":207,"title":"Deletion success view fails to correctly resequence ordinals after deletion","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/207"},{"body":" ● Rule views views › Creating rules › Choosing a rule type › should display the flat rate rule dialog when flat rate rule chosen\r\n● Rule views views › Creating rules › Choosing a rule type › should display the tiered rate rule dialog when tiered rate rule chosen\r\n● Rule views views › Creating rules › Choosing a rule type › should display the secondary tiered rate rule dialog when secondary tiered rate rule chosen\r\n\r\n Expected: false\r\n Received: true\r\n\r\n 909 | expect(app.dialogState.entity).toBe(null);\r\n 910 | expect(isShown(flatRateRuleDialog.dialog.id)).toBe(true);\r\n > 911 | expect(isShown(ruleTypeDialog.dialog.id)).toBe(false);\r\n | ^","comments":[{"id":"IC_kwDOJVY7Ys5yAHC1","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was due to the fade class being added to the rule type dialog. Removed this class.","createdAt":"2024-01-26T20:12:07Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/206#issuecomment-1912631477","viewerDidAuthor":true}],"number":206,"title":"Rule type dialog is not hidden after selecting a rule type when creating a rule","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/206"},{"body":"● Multilple choice option views › Refreshing multiple choice options data › should generate the correct request given the currently selected jurisdiction\r\n Expected: [Function displayMultipleChoiceOptionsError]\r\n Received: undefined\r\n\r\n 757 | expect(parseInt(jurisdictionId)).toBe(selectedId);\r\n 758 | expect(onSuccess).toEqual(displayMultipleChoiceOptions);\r\n > 759 | expect(onFailure).toEqual(displayMultipleChoiceOptionsError);\r\n | ^","comments":[{"id":"IC_kwDOJVY7Ys5yC15o","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The error callback parameter is not provided when invoking the refresher method. This was added.","createdAt":"2024-01-27T22:01:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/205#issuecomment-1913347688","viewerDidAuthor":true}],"number":205,"title":"Failure callback is undefined when refreshing multiple choice options","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/205"},{"body":"● Question views › Creating questions › Choosing question type › should display the correct dialog when boolean question is selected\r\n Expected: false\r\n Received: true\r\n 664 | questionTypeSelected();\r\n 665 | expect(isShown(booleanQuestionDialog.dialog.id)).toBe(true);\r\n > 666 | expect(isShown(questionTypeDialog.dialog.id)).toBe(false);","comments":[{"id":"IC_kwDOJVY7Ys5x-aV1","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Removed the fade class from the question type modal.","createdAt":"2024-01-26T14:48:54Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/204#issuecomment-1912186229","viewerDidAuthor":true}],"number":204,"title":"Question type dialog not hiding when selection is made","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/204"},{"body":"● Multilple choice option views › Displaying multiple choice options › should correctly populate the options display when the question is held in the app state\r\n\r\n TypeError: Cannot read properties of null (reading 'options')\r\n\r\n 393 | moveParentStateToAppState();\r\n 394 | question = findQuestionById(app.dialogState.entity.id);\r\n > 395 | options = question.options;\r\n | ^","comments":[{"id":"IC_kwDOJVY7Ys5x-RFX","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This occurred because the question was held in the app state rather than in the parent state prior to updating the options display. The former case occurs when the question is first edited. The latter case will occur when exiting the multiple choice option dialog.\r\n\r\nAdded some conditional logic to so that the parent state is only moved down if the parent state is not null, and if it is a multiple choice question.","createdAt":"2024-01-26T14:23:25Z","includesCreatedEdit":true,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/203#issuecomment-1912148311","viewerDidAuthor":true}],"number":203,"title":"options are null when updating options display","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/203"},{"body":"● Rule views views › Displaying rule tiers › Secondary rule tiers › should correctly populate the secondary rule tiers display and set the app state when the rule is in the parent state\r\n● Rule views views › Displaying rule tiers › Secondary rule tiers › should correctly populate the secondary rule tiers display and set the app state when the rule is in the app state\r\n● Rule views views › Displaying rule tiers › Primary rule tiers › should correctly populate the rule tiers display and set the app state when the rule is in the parent state\r\n● Rule views views › Displaying rule tiers › Primary rule tiers › should correctly populate the rule tiers display and set the app state when the rule is in the app state\r\n\r\nReferenceError: parentState is not defined\r\n\r\n 869 | app.jurisdictionRules = data;\r\n 870 |\r\n > 871 | if (parentState.entity != null) {\r\n | ^\r\n 872 | moveParentStateToAppState();\r\n 873 | }\r\n 874 | rule = findRuleById(app.dialogState.entity.id);\r\n","comments":[{"id":"IC_kwDOJVY7Ys5x-PcE","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated parentState to app.parentState.","createdAt":"2024-01-26T14:18:44Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/202#issuecomment-1912141572","viewerDidAuthor":true}],"number":202,"title":"parentState is undefined when displaying rule tiers","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/202"},{"body":"Status views › Error views › Questions › Failure to delete question › should display an appropriate error\r\n Expected: \"An error occurred while attempting to delete question.\"\r\n Received: \"An error occurred while attempting to save question.\"","comments":[{"id":"IC_kwDOJVY7Ys5yC14g","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The error message was updated in the deleteQuestionFailed view.","createdAt":"2024-01-27T22:01:10Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/201#issuecomment-1913347616","viewerDidAuthor":true}],"number":201,"title":"Delete question error dialog view shows incorrect error message","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/201"},{"body":"Expected: \"An error occurred while refreshing multiple choice options for question undefined\"\r\nReceived: \"An error occurred while refreshing multiple choice options for rule undefined\"","comments":[{"id":"IC_kwDOJVY7Ys5x8NbX","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated error message in the view to match the expected message.","createdAt":"2024-01-26T07:35:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/200#issuecomment-1911609047","viewerDidAuthor":true}],"number":200,"title":"Multiple choice options load error dialog shows incorrect error message","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/200"},{"body":" ● Dialog utilities › Status dialogs › Success dialog › should correctly display a success dialog with the correct title and message\r\n Expected: \"Success\"\r\n Received: \"An Error Occurred\"","comments":[{"id":"IC_kwDOJVY7Ys5x6BVw","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a title parameter to the showMessage utility to allow the title to be set correctly. Also updated the success dialog utility function to pass the correct title to the showMessage utility.","createdAt":"2024-01-25T21:35:13Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/199#issuecomment-1911035248","viewerDidAuthor":true}],"number":199,"title":"The showMessage utility function does not update the status dialog's title for success messages","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/199"},{"body":"● Display utilities › Rules › Flat rate rule › should correctly display the given flat rate rule\r\n TypeError: Cannot read properties of null (reading 'querySelector')\r\n 811 |\r\n 812 | let ruleDisplay = rulesDisplay.querySelector(\"#\" + flatRateRuleDisplay.card.id + \"-\" + rule.id);\r\n > 813 | let ruleNameDisplay = ruleDisplay.querySelector(\"#\" + flatRateRuleDisplay.name.id + \"-\" + rule.id);\r\n\r\n● Display utilities › Rules › Tiered rate rule › should correctly display the given tiered rate rule\r\n TypeError: Cannot read properties of null (reading 'querySelector')\r\n 838 |\r\n 839 | let ruleDisplay = rulesDisplay.querySelector(\"#\" + tieredRateRuleDisplay.card.id + \"-\" + rule.id);\r\n > 840 | let ruleNameDisplay = ruleDisplay.querySelector(\"#\" + tieredRateRuleDisplay.name.id + \"-\" + rule.id);\r\n\r\n● Display utilities › Rules › Secondary tiered rate rule › should correctly display the given secondary tiered rate rule\r\n TypeError: Cannot read properties of null (reading 'querySelector')\r\n 863 |\r\n 864 | let ruleDisplay = rulesDisplay.querySelector(\"#\" + secondaryTieredRateRuleDisplay.card.id + \"-\" + rule.id);\r\n > 865 | let ruleNameDisplay = ruleDisplay.querySelector(\"#\" + secondaryTieredRateRuleDisplay.name.id + \"-\" + rule.id);","comments":[{"id":"IC_kwDOJVY7Ys5x5_x3","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"After cloning the rule display prototype, the utility functions were updating the cloned display ID to append the prototype display's ID, instead of the rule ID. This was modified to correctly append the rule ID.","createdAt":"2024-01-25T21:30:13Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/198#issuecomment-1911028855","viewerDidAuthor":true}],"number":198,"title":"Rule display utilities are incorrectly setting the rule display ID","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/198"},{"body":"● Ordinal traversal and management › Question ordinals › Find previous › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n● Ordinal traversal and management › Question ordinals › Find previous › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n● Ordinal traversal and management › Question ordinals › Find next › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n● Ordinal traversal and management › Question ordinals › Find next › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n● Ordinal traversal and management › Ruleset ordinals › Find previous › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n ● Ordinal traversal and management › Ruleset ordinals › Find previous › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n ● Ordinal traversal and management › Ruleset ordinals › Find next › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n ● Ordinal traversal and management › Ruleset ordinals › Find next › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule ordinals › Find previous › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule ordinals › Find previous › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule ordinals › Find next › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule ordinals › Find next › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule tier ordinals › Find previous › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule tier ordinals › Find previous › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule tier ordinals › Find next › should return null given null input\r\n TypeError: Cannot read properties of null (reading 'id')\r\n\r\n ● Ordinal traversal and management › Rule tier ordinals › Find next › should return null given undefined input\r\n TypeError: Cannot read properties of undefined (reading 'id')","comments":[{"id":"IC_kwDOJVY7Ys5xueWk","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added defensive code to correctly validate inputs to find next/previous object view model methods, returning null if inputs are not valid.","createdAt":"2024-01-24T12:13:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/197#issuecomment-1908008356","viewerDidAuthor":true}],"number":197,"title":"View model methods to find first/last objects failing to handle null or undefined input","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/197"},{"body":"ReferenceError: myUndefinedVariable is not defined","comments":[{"id":"IC_kwDOJVY7Ys5xuZrE","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Replaced myUndefinedVariable with undefined keyword","createdAt":"2024-01-24T12:00:35Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/196#issuecomment-1907989188","viewerDidAuthor":true}],"number":196,"title":"myUndefinedVariable is not defined in multiple view model tests in config app","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/196"},{"body":" ● App state management › Parent state management › should correctly set then clear the parent state\r\n\r\n expect(received).toBe(expected) // Object.is equality\r\n\r\n Expected: \"create\"\r\n Received: null\r\n\r\n 56 | test(\"should correctly set then clear the parent state\", () => {\r\n 57 | setParentState(dialogStates.modes.create, dialogStates.entityTypes.booleanQuestion, { test: \"test\" });\r\n > 58 | expect(app.parentState.mode).toBe(dialogStates.modes.create);","comments":[{"id":"IC_kwDOJVY7Ys5xp5rZ","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"setParentState was setting the dialog state, rather than the parent state. Updated the function accordingly.","createdAt":"2024-01-23T19:46:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/195#issuecomment-1906809561","viewerDidAuthor":true}],"number":195,"title":"Parent state is null after calling setParentState in config app","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/195"},{"body":" ● Question service clients › Multiple choice questions › PUT › should fail to update a multiple choice, returning a 400 response\r\n\r\n ReferenceError: is_mandatory is not defined\r\n\r\n 222 | ordinal: ordinal,\r\n 223 | explainer: explainer,\r\n > 224 | is_mandatory: is_mandatory,\r\n | ^\r\n 225 | type: \"multiple_choice\"\r\n 226 | };\r\n 227 | put(endpoints.forms.questions(formId), questionId, data, onSuccess, onFailure);","comments":[{"id":"IC_kwDOJVY7Ys5xislq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Replaced is_mandatory variable with isMandatory in updateMultipleChoiceQuestion service client method.","createdAt":"2024-01-22T22:15:42Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/194#issuecomment-1904920938","viewerDidAuthor":true}],"number":194,"title":"is_mandatory is not defined in update multiple choice question service method","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/194"},{"body":"Test \"Service client helper functions › Query string generation › should return return valid http query string\" returns:\r\n\r\n Expected: \"testStringParameter=abc&testIntParameter=5&testBooleanParameter=true\"\r\n Received: \"testStringParameter=abctestIntParameter=5testBooleanParameter=true\"","comments":[{"id":"IC_kwDOJVY7Ys5xT4jP","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional code to correctly separate parameters with \"&\".","createdAt":"2024-01-19T20:07:29Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/193#issuecomment-1901037775","viewerDidAuthor":true}],"number":193,"title":"Query string generation helper for config app not correctly concatenating parameters","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/193"},{"body":"FAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_no_secondary_income - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_primary_income_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_primary_income_within_boundaries_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_primary_income_on_upper_boundary_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tier_calculate_where_primary_income_above_upper_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tiered_rule_iteration_with_single_tier_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_calculations.py::test_secondary_tiered_rule_iteration_with_multiple_tiers_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_no_secondary_income - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_within_boundaries_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_on_upper_boundary_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_above_upper_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tiered_rule_iteration_with_single_tier_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_models.py::test_secondary_tiered_rule_iteration_with_multiple_tiers_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_no_secondary_income - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_primary_income_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_primary_income_within_boundaries_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_primary_income_on_upper_boundary_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tier_calculate_where_primary_income_above_upper_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tiered_rule_iteration_with_single_tier_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_secondary_tiered_rule_iteration_with_multiple_tiers_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_null_data - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_null_rule_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_existent_rule_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_numeric_rule_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_null_primary_tier_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_existent_primary_tier_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_numeric_primary_tier_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_null_tier_rate - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_create_valid_secondary_rule_tier - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_rule_tier_with_null_tier_rate - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_services.py::test_update_valid_secondary_rule_tier - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_no_secondary_income - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_primary_income_and_total_within_boundaries - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_primary_income_within_boundaries_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_primary_income_on_upper_boundary_and_total_exceeds - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tier_calculate_where_primary_income_above_upper_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tiered_rule_iteration_with_single_tier_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_secondary_tiered_rule_iteration_with_multiple_tiers_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_secondaryruletier.ordinal\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_rule_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_primary_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_primary_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_primary_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - assert 400 == 200\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_null_data - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_null_tier_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_non_existent_tier_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_non_numeric_tier_id - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_null_tier_rate - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'\r\nFAILED rules_api/test_views.py::test_put_valid_secondary_rule_tier - TypeError: create_secondary_rule_tier() missing 1 required positional argument: 'tier_rate'","comments":[{"id":"IC_kwDOJVY7Ys5xS01s","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was caused by a change to secondary rule tier view and service contracts in the rule API. Updated the tests to reflect the contract change.","createdAt":"2024-01-19T16:54:10Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/192#issuecomment-1900760428","viewerDidAuthor":true}],"number":192,"title":"Multiple secondary rule tier tests failing in rules API after additional of ordinal as a required field for PUT and POST requests","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/192"},{"body":"When deleting a rule tier using the config app, the rule API returns 500 with the error message \"FATAL too many connections\".","comments":[{"id":"IC_kwDOJVY7Ys5xQwyk","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved the issue by setting the conn_max_age setting on the database to = 0 using the technique suggested here: https://medium.com/@nixon1333/reduce-no-of-db-connection-with-django-d21328b1bed4","createdAt":"2024-01-19T11:17:21Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/191#issuecomment-1900219556","viewerDidAuthor":true}],"number":191,"title":"Too many DB connections when deleting rule tier","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/191"},{"body":"**Steps to reproduce**\r\n\r\n1. In the config app, create a ruleset and add rules to this including at least one tiered rate rule and one secondary tiered rate rule with the tiered rate rule as the primary rule\r\n2. Delete the ruleset in the config app\r\n\r\n**Expected result**\r\nThe ruleset and all rules within the ruleset will be deleted. If any tiered rate rules are defined which are referenced by secondary tiered rate rules in another ruleset, then those secondary tiered rate rules will also be deleted.\r\n\r\n**Actual result**\r\nIntegrityError: update or delete on table \"rules_api_tieredraterule\" violates foreign key constraint on table \"rules_api_tieredraterule\"\r\nDETAIL: Key (id)=(5) is still referenced from table \"rules_api_tieredraterule\".","comments":[{"id":"IC_kwDOJVY7Ys5w3Y1x","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was caused by an issue in Django polymorphic as documented here: https://github.com/jazzband/django-polymorphic/issues/229\r\n\r\nThere is also the possibility that multiple secondary tiered rate rules reference a single tiered rate rule creating further opportunities for integrity issues. Resolved by deleting the ruleset hierarchy bottom up starting with flat rate and secondary tiered rate rules, then tiered rate rules, then the ruleset.","createdAt":"2024-01-16T11:35:30Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/190#issuecomment-1893567857","viewerDidAuthor":true}],"number":190,"title":"Integrity error when deleting ruleset with rules","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/190"},{"body":"**Steps to reproduce** \r\n\r\n1. Go to the config app\r\n2. Select a jurisdiction known to have rules defined\r\n\r\n**Expected result**\r\nAll rules for the selected jurisdiction are displayed under the appropriate ruleset and in order.\r\n\r\n**Actual result**\r\nNo rules are displayed for the selected jurisdiction","comments":[{"id":"IC_kwDOJVY7Ys5wWZRs","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The rules API is not including the rule type in the serialised rule when returning a response. As a result, the config app does not know which rule type to display for each rule. Resolved by adding the rule type into the serialised rule.","createdAt":"2024-01-10T14:08:48Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/189#issuecomment-1884918892","viewerDidAuthor":true}],"number":189,"title":"Config app not displaying rules for selected jurisdiction","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/189"},{"body":"When accessing admin apps to view or edit existing records, the autocomplete boxes do not display current values.","comments":[{"id":"IC_kwDOJVY7Ys5ycxTN","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Removed all admin apps which require autocomplete boxes","createdAt":"2024-01-31T23:08:07Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/188#issuecomment-1920144589","viewerDidAuthor":true}],"number":188,"title":"Autocomplete boxes on admin apps don't auto-populate with existing data","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/188"},{"body":"**Steps to reproduce**\r\n\r\n1. Sign in with user account that has expired subscription\r\n2. Choose to create new tax calculation\r\n3. Select a subscription option and click submit button\r\n\r\n**Expected result**\r\nThe checkout page should be displayed with the correct price for the chosen subscription option\r\n\r\n**Actual result**\r\nThe following JSONDecodeError is dsiplayed:\r\n\r\nJSONDecodeError at /checkout/\r\nExpecting value: line 1 column 1 (char 0)\r\n","comments":[{"id":"IC_kwDOJVY7Ys5vhnoK","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The checkout view was hardcoded to post new payments with a null subscription_id. This was done initially because the susbcription_id is not readily obtainable by the checkout view. The payments API and subscription signals were therefore updated to use the user_id rather than the subscription_id to link payments to the subscriptions which should be updated.","createdAt":"2023-12-28T11:37:06Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/187#issuecomment-1871084042","viewerDidAuthor":true}],"number":187,"title":"JSONDecodeError after selecting subscription option to pay for","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/187"},{"body":"**Steps to reproduce**\r\n\r\n1. Register as a new user\r\n2. Create a payment via the API using the new user's ID\r\n3. Complete the payment\r\n\r\n**Expected results**\r\nThe user has a subscription updated with the specified subscription_option\r\n\r\n**Actual results**\r\nThe user has no subscription and the signal throws an error","comments":[{"id":"IC_kwDOJVY7Ys5vW3H3","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a signal to the subscription_api app to create a new subscription with no selected option when a new user is first created. Updated the create_subscription service to create subscriptions with a null option. Updated tests to handle this change.","createdAt":"2023-12-23T10:29:49Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/186#issuecomment-1868263927","viewerDidAuthor":true}],"number":186,"title":"Users who have no subscription are not correctly handled when making first payment","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/186"},{"body":"FAILED payments_api/test_services.py::test_create_payment_with_null_subscription_id - django.core.exceptions.ValidationError: {'subscription_id': ['This field cannot be null.']}","comments":[{"id":"IC_kwDOJVY7Ys5vW1B9","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the test to expect a validation error if the subscription ID is null","createdAt":"2023-12-23T09:46:52Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/185#issuecomment-1868255357","viewerDidAuthor":true}],"number":185,"title":"Payments API test fails with ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/185"},{"body":"FAILED forms_api/test_views.py::test_post_form - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_post_second_form_for_jurisdiction - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_form_with_null_jurisdiction_id - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_form_with_non_numeric_jurisdiction_id - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_get_forms_with_no_jurisdiction_ids_list - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_get_forms_with_empty_jurisdiction_ids_list - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_get_forms_with_non_numeric_jurisdiction_ids_in_list - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_get_single_form - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_get_multiple_forms - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_delete_form - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_data - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_explainer - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_is_mandatory - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_data - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_explainer - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_is_mandatory - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_data - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_explainer - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_is_mandatory - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_data - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_explainer - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_is_mandatory - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_data - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_explainer - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_is_mandatory - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_data - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_explainer - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_is_mandatory - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_delete_question - assert 404 == 200\r\nFAILED forms_api/test_views.py::test_post_option_with_null_text - assert 404 == 400\r\nFAILED forms_api/test_views.py::test_post_option - AttributeError: 'HttpResponseNotFound' object has no attribute 'data'\r\nFAILED forms_api/test_views.py::test_delete_option - assert 404 == 200\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_subscription_id - django.core.exceptions.ValidationError: {'subscription_id': ['This field cannot be null.']}\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_null_data - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_null_jurisdiction_id - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_duplicate_tax_category_jurisdiction_combination - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_valid_ruleset - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_delete_ruleset - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_tax_category_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_tax_category_with_duplicate_name - assert 404 == 409\r\nFAILED rules_api/test_views.py::test_post_valid_tax_category - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_delete_tax_category - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_delete_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_crete_flat_rate_rule_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_nulL_explainer - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_variable_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_flat_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_flat_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_negative_flat_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_valid_flat_rate_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_nulL_explainer - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_variable_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_flat_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_non_numeric_flat_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_negative_flat_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_valid_flat_rate_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_create_tiered_rate_rule_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_nulL_explainer - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_variable_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_valid_tiered_rate_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_tiered_rate_rule_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_tiered_rate_rule_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_tiered_rate_rule_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_tiered_rate_rule_with_nulL_explainer - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_tiered_rate_rule_with_null_variable_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_valid_tiered_rate_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_min_value - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_min_value - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_max_value - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_max_value - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_valid_rule_tier - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_min_value - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_min_value - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_max_value - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_max_value - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_valid_rule_tier - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_crete_secondary_tiered_rate_rule_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_nulL_explainer - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_variable_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_tiered_rate_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_secondary_iered_rate_rule_with_null_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_non_numeric_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_explainer - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_variable_name - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_valid_secondary_tiered_rate_rule - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - assert 404 == 200\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_null_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_non_numeric_tier_rate - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_put_valid_secondary_rule_tier - assert 404 == 200","comments":[{"id":"IC_kwDOJVY7Ys5u942h","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The url pattern for the rule and forms APIs was missing from the root url.py. Added these back in to root urls.","createdAt":"2023-12-18T21:38:13Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/184#issuecomment-1861717409","viewerDidAuthor":true}],"number":184,"title":"Multiple tests across multiple APIs fail with 404 or HttpResponseNotFOund","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/184"},{"body":"FAILED payments_api/test_views.py::test_process_payment_success_webhook - assert False == True","comments":[{"id":"IC_kwDOJVY7Ys5u918G","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added signal to trigger subscription update when a payment is completed. Also added validation to prevent a payment from completing twice. Finally, replaced use of update() on a payment queryset with save() on the individual payment to ensure that the post_save() signal triggers correctly.","createdAt":"2023-12-18T21:32:34Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/183#issuecomment-1861705478","viewerDidAuthor":true}],"number":183,"title":"Payment success webhook not correctly updating the subscription","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/183"},{"body":"FAILED payments_api/test_views.py::test_post_payment_with_null_data - assert 400 == 404\r\nFAILED payments_api/test_views.py::test_post_payment_with_null_subscription_id - assert 200 == 404\r\nFAILED payments_api/test_views.py::test_post_payment_with_null_subscription_option_id - assert 400 == 404","comments":[{"id":"IC_kwDOJVY7Ys5u4nZV","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional validation to ensure null subscription_ids or subscription_option_ids return 404 are are not allowed","createdAt":"2023-12-18T12:15:22Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/182#issuecomment-1860335189","viewerDidAuthor":true}],"number":182,"title":"Post payment tests return unexpected http statuses","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/182"},{"body":"FAILED payments_api/test_views.py::test_post_valid_payment - assert 2 == 1","comments":[{"id":"IC_kwDOJVY7Ys5u4ck-","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"1 is the default status when a payment is first created. 2 is the status that indicates successful creation of the payment intent in Stripe. Updated the test to expect 2 rather than 1, since POSTing the payment should also successfully create the payment intent.","createdAt":"2023-12-18T11:56:47Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/181#issuecomment-1860290878","viewerDidAuthor":true}],"number":181,"title":"Testing valid payment creation via API fails","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/181"},{"body":"FAILED payments_api/test_views.py::test_post_valid_payment - AttributeError: 'Payment' object has no attribute 'vat'","comments":[{"id":"IC_kwDOJVY7Ys5u4XnZ","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Removed the invalid assertion from the test.","createdAt":"2023-12-18T11:50:32Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/180#issuecomment-1860270553","viewerDidAuthor":true}],"number":180,"title":"'Payment' object has no attribute 'vat' when posting valid payment","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/180"},{"body":"FAILED payments_api/test_views.py::test_post_payment_with_null_data - django.core.exceptions.ValidationError: ['Parameter total must be a valid integer or a float to 2 decimal places']\r\nFAILED payments_api/test_views.py::test_post_payment_with_null_subscription_option_id - django.core.exceptions.ValidationError: {'subscription_option_id': ['This field cannot be null.']}\r\nFAILED payments_api/test_views.py::test_post_payment_with_negative_subscription_option_id - django.core.exceptions.ValidationError: {'subscription_option_id': ['Ensure this value is greater than or equal to 0.0.']}\r\nFAILED payments_api/test_views.py::test_post_payment_with_null_total - django.core.exceptions.ValidationError: ['Parameter total must be a valid integer or a float to 2 decimal places']\r\nFAILED payments_api/test_views.py::test_post_payment_with_negative_total - django.core.exceptions.ValidationError: {'total': ['Ensure this value is greater than or equal to 0.0.']}\r\nFAILED payments_api/test_views.py::test_post_payment_with_invalid_currency_code - stripe.error.InvalidRequestError: Request req_cMqVxWd0f8GOlI: Invalid currency: g. Stripe currently supports these currencies: usd, aed, afn, all, amd, ang, aoa, ars, aud, awg, azn, bam, bbd, bdt, bgn, b...","comments":[{"id":"IC_kwDOJVY7Ys5u4RDq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional error handling to POST payments endpoint","createdAt":"2023-12-18T11:40:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/179#issuecomment-1860243690","viewerDidAuthor":true}],"number":179,"title":"POST payment endpoint returns various errors rather than graceful HTTP responses","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/179"},{"body":"FAILED payments_api/test_views.py::test_post_payment_with_null_subscription_id - AttributeError: 'int' object has no attribute 'id'","comments":[{"id":"IC_kwDOJVY7Ys5u4De-","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was a typo in the test code - id was being called on the id attribute. Updated the test code.","createdAt":"2023-12-18T11:14:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/178#issuecomment-1860188094","viewerDidAuthor":true}],"number":178,"title":"Posting payment with null subscription id fails with AttributeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/178"},{"body":"FAILED payments_api/test_views.py::test_post_payment_with_null_data - TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'\r\nFAILED payments_api/test_views.py::test_post_payment_with_null_total - TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'","comments":[{"id":"IC_kwDOJVY7Ys5u4BQW","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Removed validation on the post payment view since total is already validated in the service and model layer.","createdAt":"2023-12-18T11:10:15Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/177#issuecomment-1860178966","viewerDidAuthor":true}],"number":177,"title":"Posting payments with null data or total returns TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/177"},{"body":"FAILED payments_api/test_views.py::test_post_payment_with_null_subscription_option_id - django.core.exceptions.ValidationError: ['Parameter total must be a valid float to 2 decimal places']\r\nFAILED payments_api/test_views.py::test_post_payment_with_negative_subscription_option_id - django.core.exceptions.ValidationError: ['Parameter total must be a valid float to 2 decimal places']\r\nFAILED payments_api/test_views.py::test_post_payment_with_negative_total - django.core.exceptions.ValidationError: ['Parameter total must be a valid float to 2 decimal places']\r\nFAILED payments_api/test_views.py::test_post_payment_with_invalid_currency_code - django.core.exceptions.ValidationError: ['Parameter total must be a valid float to 2 decimal places']\r\nFAILED payments_api/test_views.py::test_post_valid_payment - django.core.exceptions.ValidationError: ['Parameter total must be a valid float to 2 decimal places']","comments":[{"id":"IC_kwDOJVY7Ys5u3zSj","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Modified validation rule in the create_payment service to allow total to be a float or an integer.","createdAt":"2023-12-18T10:53:07Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/176#issuecomment-1860121763","viewerDidAuthor":true}],"number":176,"title":"Posting payment tests fail with ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/176"},{"body":"FAILED payments_api/test_views.py::test_process_payment_success_webhook_with_unknown_stripe_pid - payments_api.models.Payment.DoesNotExist\r\nFAILED payments_api/test_views.py::test_process_payment_failure_webhook_with_unknown_stripe_pid - payments_api.models.Payment.DoesNotExist","comments":[{"id":"IC_kwDOJVY7Ys5u0sZH","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to ensure graceful HTTP responses are returned when an invalid/non-existent payment ID is provided.","createdAt":"2023-12-17T22:35:54Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/175#issuecomment-1859307079","viewerDidAuthor":true}],"number":175,"title":"Payment webhook view fails to raise a graceful HTTP error when Payment.DoesNotExist occurs","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/175"},{"body":"FAILED payments_api/test_views.py::test_process_payment_success_webhook - AttributeError: 'Settings' object has no attribute 'STRIPE_WH_SECRET'\r\nFAILED payments_api/test_views.py::test_process_payment_success_webhook_with_unknown_stripe_pid - AttributeError: 'Settings' object has no attribute 'STRIPE_WH_SECRET'\r\nFAILED payments_api/test_views.py::test_process_payment_failure_webhook - AttributeError: 'Settings' object has no attribute 'STRIPE_WH_SECRET'\r\nFAILED payments_api/test_views.py::test_process_payment_failure_webhook_with_unknown_stripe_pid - AttributeError: 'Settings' object has no attribute 'STRIPE_WH_SECRET'","comments":[{"id":"IC_kwDOJVY7Ys5u0ReD","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added Stripe's HTTP_STRIPE_SIGNATURE header when posting test webhooks. Generated the Stripe signature using code borrowed from the Stripe Python library's tests at https://github.com/stripe/stripe-python/blob/master/tests/test_webhook.py","createdAt":"2023-12-17T15:05:20Z","includesCreatedEdit":true,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/174#issuecomment-1859196803","viewerDidAuthor":true}],"number":174,"title":"AttributeError when testing process payment webhooks","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/174"},{"body":"FAILED payments_api/test_views.py::test_process_payment_success_webhook - assert 404 == 200\r\nFAILED payments_api/test_views.py::test_process_payment_failure_webhook - assert 404 == 200","comments":[{"id":"IC_kwDOJVY7Ys5u0QiO","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Moved payments API urls into local urls.py and updated the URL in the test code for posting webhooks.","createdAt":"2023-12-17T14:48:40Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/173#issuecomment-1859192974","viewerDidAuthor":true}],"number":173,"title":"Tests for the process payment webhook fail with unexpected 404","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/173"},{"body":"FAILED payments_api/test_views.py::test_patch_payment_with_null_stripe_card_id - stripe.error.InvalidRequestError: Request req_SFXARazfhZ7uyA: You cannot confirm this PaymentIntent because it's missing a payment method. You can either update the PaymentIntent with a payment method an...\r\nFAILED payments_api/test_views.py::test_patch_payment_with_non_string_stripe_card_id - stripe.error.InvalidRequestError: Request req_E8gxmRPY8yLoFl: No such PaymentMethod: '1234'","comments":[{"id":"IC_kwDOJVY7Ys5u0P22","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional error handling to the PATCH payment view to ensure graceful http error responses are returned.","createdAt":"2023-12-17T14:37:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/172#issuecomment-1859190198","viewerDidAuthor":true}],"number":172,"title":"Patching payments with invalid Stripe card IDs returns unexpected Stripe errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/172"},{"body":"An earlier version of the payment API accepted full card and billing address details as input. This has since been updated to accept only the stripe card id (assuming that the front-end card component from Stripe is used to create the card directly with stripe). The view tests have not been updated accordingly.","comments":[{"id":"IC_kwDOJVY7Ys5u0PrY","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated all patch tests to pass the expected payload into the API.","createdAt":"2023-12-17T14:33:55Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/171#issuecomment-1859189464","viewerDidAuthor":true}],"number":171,"title":"View tests on PATCH payments provide full billing details as opposed to just the stripe card id","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/171"},{"body":"A change in the subscription and payment models replaced the use of a number of payment months to represent what is being purchased with the concept of a subscription option id. The payment views tests haven't been updated to reflect this.","comments":[{"id":"IC_kwDOJVY7Ys5u0IJC","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to create mock subscriptions and subscription options and pass these into payloads rather than requested_months.","createdAt":"2023-12-17T12:30:18Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/170#issuecomment-1859158594","viewerDidAuthor":true}],"number":170,"title":"Payment view tests incorrectly pass subscription months rather than subscription_option_id to payment services","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/170"},{"body":"FAILED payments_api/test_views.py::test_post_valid_payment - KeyError: 'id'","comments":[{"id":"IC_kwDOJVY7Ys5u0HYo","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The correct attribute returned when successfully posting payments is payment_id. Updated the test code accoordingly.","createdAt":"2023-12-17T12:17:59Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/169#issuecomment-1859155496","viewerDidAuthor":true}],"number":169,"title":"Posting valid payment fails with KeyError: id","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/169"},{"body":"FAILED payments_api/test_views.py::test_process_payment_success_webhook - TypeError: Field 'id' expected a number but got (1, 'pi_3OOHlgFkVBiDxSnk0rOtjx0C_secret_LcaQcpPRnqSic0YzXB5K7XuJx').\r\nFAILED payments_api/test_views.py::test_process_payment_failure_webhook - TypeError: Field 'id' expected a number but got (1, 'pi_3OOHlhFkVBiDxSnk1clVN02q_secret_E79mJ36CANfQAEiQkvV9QzV5K').","comments":[{"id":"IC_kwDOJVY7Ys5u0Eec","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"All views tests were expecting a single id parameter to be returned by create_payment. However, create_payment actually returns id and a stripe id. Updated all views tests to accept both parameters in response.","createdAt":"2023-12-17T11:24:28Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/168#issuecomment-1859143580","viewerDidAuthor":true}],"number":168,"title":"Payment processing view tests fail with TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/168"},{"body":"FAILED payments_api/test_views.py::test_patch_payment_with_null_payment_data - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_street1 - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_street2 - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_city - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_county - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_country - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_postcode - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_card_number - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_expiry - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_null_ccv2 - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it.\r\nFAILED payments_api/test_views.py::test_patch_payment_with_short_card_number - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_long_card_number - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_non_date_expiry - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_non_numeric_ccv2 - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it. \r\nFAILED payments_api/test_views.py::test_patch_payment_with_nonexistent_payment_id - RuntimeError: Database access not allowed, use the \"django_db\" mark, or the \"db\" or \"transactional_db\" fixtures to enable it","comments":[{"id":"IC_kwDOJVY7Ys5u0B7_","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added @pytest.mark.django_db to all views tests.","createdAt":"2023-12-17T10:37:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/167#issuecomment-1859133183","viewerDidAuthor":true}],"number":167,"title":"Payment API views tests failing with database access not allowed","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/167"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - AttributeError: 'HttpResponseNotFound' object has no attribute 'data'","comments":[{"id":"IC_kwDOJVY7Ys5u0BmN","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test code was posting to an incorrect URL in order to retrieve the updated subscription. Modified the test code to access the subscription directly via the model.","createdAt":"2023-12-17T10:30:53Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/166#issuecomment-1859131789","viewerDidAuthor":true}],"number":166,"title":"Testing processing of successful payments fails with 'AttributeError: 'HttpResponseNotFound' object has no attribute 'data''","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/166"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - django.core.exceptions.ValidationError: {'subscription_id': ['“Subscription for user 479” value must be an integer.']}","comments":[{"id":"IC_kwDOJVY7Ys5u0BbA","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test was passing the whole subscription object to the service. Updated to pass in the id only.","createdAt":"2023-12-17T10:27:29Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/165#issuecomment-1859131072","viewerDidAuthor":true}],"number":165,"title":"Valid process payment success test fails with ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/165"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - KeyError: 'subscription_id'","comments":[{"id":"IC_kwDOJVY7Ys5uz3HE","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was because an invalid subscription option was being passed in when created via the subscription API to create a subscription. Updated the test code to create subscription options and subscriptions directly via the model.","createdAt":"2023-12-17T09:44:28Z","includesCreatedEdit":true,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/164#issuecomment-1859088836","viewerDidAuthor":true}],"number":164,"title":"Valid payment processing test fails with KeyError 'subscription_id'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/164"},{"body":"FAILED rules_api/test_views.py::test_post_tax_category_with_null_name - django.core.exceptions.ValidationError: {'name': ['This field cannot be null.']}\r\nFAILED rules_api/test_views.py::test_post_tax_category_with_duplicate_name - django.core.exceptions.ValidationError: {'name': ['Tax category with this Name already exists.']}","comments":[{"id":"IC_kwDOJVY7Ys5uzSTz","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to return 409 if the tax category name already exists or 400 for other validation errors.","createdAt":"2023-12-16T21:54:45Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/163#issuecomment-1858938099","viewerDidAuthor":true}],"number":163,"title":"Posting invalid tax category requests returns unexpected validation errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/163"},{"body":"FAILED rules_api/test_views.py::test_delete_ruleset_with_non_existent_id - rules_api.models.RuleSet.DoesNotExist: RuleSet matching query does not exist.\r\nFAILED rules_api/test_views.py::test_delete_tax_category_with_non_existent_id - rules_api.models.TaxCategory.DoesNotExist: TaxCategory matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uzSIN","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to the endpoints to gracefully handle DoesNotExist errors.","createdAt":"2023-12-16T21:50:27Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/162#issuecomment-1858937357","viewerDidAuthor":true}],"number":162,"title":"Deleting rulesets and tax categories with non-existent IDs raises DoesNotExist errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/162"},{"body":"FAILED rules_api/test_views.py::test_put_rule_tier_with_non_existent_tier_id - rules_api.models.RuleTier.DoesNotExist: RuleTier matching query does not exist.\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_min_value - django.core.exceptions.ValidationError: {'min_value': ['This field cannot be null.']}\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_min_value - django.core.exceptions.ValidationError: {'min_value': ['“abc” value must be an integer.']}\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_max_value - django.core.exceptions.ValidationError: {'max_value': ['“abc” value must be an integer.']}\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_ordinal - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_ordinal - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_tier_rate - django.core.exceptions.ValidationError: {'tier_rate': ['This field cannot be null.']}\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_tier_rate - django.core.exceptions.ValidationError: {'tier_rate': ['“abc” value must be a float.']}","comments":[{"id":"IC_kwDOJVY7Ys5uzSB5","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to the PUT rule_tier endpoint to gracefully handle validation and doesnotexist errors.","createdAt":"2023-12-16T21:48:00Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/161#issuecomment-1858936953","viewerDidAuthor":true}],"number":161,"title":"Putting rule tier returns unexpected DoesNotExist and ValidationErrors instead of graceful HTTP status codes","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/161"},{"body":"FAILED rules_api/test_views.py::test_post_rule_tier_with_non_existent_rule_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_valid_rule_tier - assert 400 == 200\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_existent_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_put_valid_rule_tier - assert 400 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uz16f","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional validation to the endpoint views to catch DoesNotExist errors and return expected responses. Additionally updated all rule_tier tests to use 'tax_rate' rather than 'tier_rate' when passing the tier's tax rate to the endpoint.","createdAt":"2023-12-17T09:22:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/160#issuecomment-1859083935","viewerDidAuthor":true}],"number":160,"title":"Posting and putting rule tiers returns unexpected 400 errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/160"},{"body":"FAILED rules_api/test_views.py::test_put_valid_flat_rate_rule - AssertionError: assert 'salary' == 'Test explainer updated'","comments":[{"id":"IC_kwDOJVY7Ys5uz16J","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The private put_flat_rate_rule() method on the RuleDetail view ordered the explainer and variable_name parameters incorrectly. Updated the ordering.","createdAt":"2023-12-17T09:22:14Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/159#issuecomment-1859083913","viewerDidAuthor":true}],"number":159,"title":"AssertionError when testing valid updates to flat_rate_Rules","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/159"},{"body":"FAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - AttributeError: 'SecondaryRuleTier' object has no attribute 'rule'\r\nFAILED rules_api/test_views.py::test_put_valid_secondary_rule_tier - AttributeError: 'SecondaryRuleTier' object has no attribute 'rule'","comments":[{"id":"IC_kwDOJVY7Ys5uzRYq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The correct attribute name is secondary_rule. Updated the test code accordingly.","createdAt":"2023-12-16T21:31:22Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/158#issuecomment-1858934314","viewerDidAuthor":true}],"number":158,"title":"AttributeError: 'SecondaryRuleTier' object has no attribute 'rule'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/158"},{"body":"FAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - KeyError: 'tier_id'\r\nFAILED rules_api/test_views.py::test_put_tiered_rate_rule_with_nulL_explainer - KeyError: 'rule_id'\r\nFAILED rules_api/test_views.py::test_put_valid_tiered_rate_rule - KeyError: 'rule_id'\r\nFAILED rules_api/test_views.py::test_post_valid_ruleset - KeyError: 'tax_category_id'","comments":[{"id":"IC_kwDOJVY7Ys5uzRRe","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Puts do not return ids and these tests already have the required ids, so removed the lines from the tests that are attempting to access these ids from the API response.\r\nUpdated the POST tests to use the correct key when retrieving ids from the response.","createdAt":"2023-12-16T21:28:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/157#issuecomment-1858933854","viewerDidAuthor":true}],"number":157,"title":"Posting or putting valid rule API requests returns key errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/157"},{"body":"FAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_primary_rule_id - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_existent_primary_rule_id - rules_api.models.TieredRateRule.DoesNotExist: TieredRateRule matching query does not exist.\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_numeric_primary_rule_id - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value \r\nFAILED rules_api/test_views.py::test_put_secondary_rule_tier_with_non_existent_tier_id - rules_api.models.SecondaryRuleTier.DoesNotExist: SecondaryRuleTier matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uzRCA","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional validation to correctly handle DoesNotExist errors in the relevant views.","createdAt":"2023-12-16T21:22:26Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/156#issuecomment-1858932864","viewerDidAuthor":true}],"number":156,"title":"Posting and putting secondary_tiered_rate_rules/secondary_rule_tiers with invalid foreign keys returns unexpected DoesNotExist errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/156"},{"body":"FAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_variable_name - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_nulL_explainer - assert 400 == 200\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_variable_name - assert 200 == 400\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_rule_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_primary_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_primary_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_primary_tier_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - assert 400 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uzQ2h","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The view was mixing up the order of parameters when passing between the view and the service. Additionally, the test was expecting to receive a rule_id back from update methods which does not happen. Furthermore, secondary_rule_tier tests were passing in a 'tier_rate' attribute instead of a 'tax_rate' attribute.\r\nAnother issue was the POST secondary rule tier endpoint was mixing up rule_pk and primary_tier_id parameters.\r\nAdditionally, error handling was missing from this endpoint to deal with the primary rule tier not being found.\r\nFinally, some tests were expecting 200 instead of 400 or 404.","createdAt":"2023-12-16T21:17:51Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/155#issuecomment-1858932129","viewerDidAuthor":true}],"number":155,"title":"Secondary tiered rate rules/secondary rule tiers return unexpected 400 errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/155"},{"body":"FAILED rules_api/test_views.py::test_put_flat_rate_rule_with_nulL_explainer - AssertionError: assert None == 'Test explainer updated'","comments":[{"id":"IC_kwDOJVY7Ys5uzOyA","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The explainer variable in the test code was being set to a different value to that which was being passed to the API in the request body. Updated the code to set the body value based on the variable.","createdAt":"2023-12-16T20:25:31Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/154#issuecomment-1858923648","viewerDidAuthor":true}],"number":154,"title":"AssertionError when testing updates to flat_rate_rules with null explainers","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/154"},{"body":"FAILED rules_api/test_views.py::test_put_flat_rate_rule_with_non_existent_rule_id - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_name - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_ordinal - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_non_numeric_ordinal - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_nulL_explainer - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_variable_name - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_null_flat_rate - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_non_numeric_flat_rate - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_negative_flat_rate - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_views.py::test_put_valid_flat_rate_rule - TypeError: update_flat_rate_rule() missing 1 required positional argument: 'tax_rate'","comments":[{"id":"IC_kwDOJVY7Ys5uzOny","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The put_flat_rate_rule method on the RuleDetail view was failing to pass the primary key of the rule to be updated down to the service.","createdAt":"2023-12-16T20:21:46Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/153#issuecomment-1858922994","viewerDidAuthor":true}],"number":153,"title":"Update flat_rate_rule tests result in a TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/153"},{"body":"FAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_existent_ruleset_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_post_valid_flat_rate_rule - assert 400 == 200\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_non_existent_rule_id - assert 400 == 404\r\nFAILED rules_api/test_views.py::test_put_flat_rate_rule_with_nulL_explainer - assert 400 == 200\r\nFAILED rules_api/test_views.py::test_put_valid_flat_rate_rule - assert 400 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uzNjS","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The tests were passing the tax rate in using the attribute name 'flat_rate' instead of 'tax_rate'. Updated all tests. Additionally, the order of parameters in the post_flat_rate_rule method on the RuleList view was incorrect so that name and ruleset_pk were being mixed up. Updated the service accordingly.\r\nFinally, the order of parameters was inconsistent between methods on the view and the service causing confusion and leading to values getting mixed up. Updated both the services and views to be consistent.","createdAt":"2023-12-16T19:58:20Z","includesCreatedEdit":true,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/152#issuecomment-1858918610","viewerDidAuthor":true}],"number":152,"title":"Flat rate rule tests do not return the expected HTTP status codes","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/152"},{"body":"FAILED rules_api/test_views.py::test_post_ruleset_with_duplicate_tax_category_jurisdiction_combination - assert 400 == 409","comments":[{"id":"IC_kwDOJVY7Ys5uzMj0","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional error handling code to the API endpoint view to return a 409 in this specific case","createdAt":"2023-12-16T19:37:54Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/151#issuecomment-1858914548","viewerDidAuthor":true}],"number":151,"title":"POSTing ruleset with duplicate tax category/jurisdiction combination returns 400 instead of 409","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/151"},{"body":"FAILED rules_api/test_views.py::test_post_ruleset_with_null_tax_category_id - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_non_existent_tax_category_id - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_null_ordinal - assert 404 == 400\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_non_numeric_ordinal - assert 404 == 400","comments":[{"id":"IC_kwDOJVY7Ys5uzNLr","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"For null/non_existent tax category tests, 404 is the appropriate error so the tests were updated.\r\nFor null_ordinal tests, invalid tax_category_ids were being passed into the service causing an appropriate 404 response. The tests were updated to pass in valid tax_category_ids.","createdAt":"2023-12-16T19:50:26Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/150#issuecomment-1858917099","viewerDidAuthor":true}],"number":150,"title":"POSTing rulesets with invalid tax_category_id or ordinals returns 404 unexpectedly","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/150"},{"body":"test_post_ruleset_with_duplicate_tax_category_jurisdiction_combination - KeyError: 'tax_category_id'","comments":[{"id":"IC_kwDOJVY7Ys5uzMGl","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Attempting to access tax_category_id from the POST ruleset response. The correct key is ruleset_id. Updated test code to reflect this.","createdAt":"2023-12-16T19:27:16Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/149#issuecomment-1858912677","viewerDidAuthor":true}],"number":149,"title":"Testing POST ruleset with duplicate tax category/jurisdiction combination returns key error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/149"},{"body":"FAILED rules_api/test_views.py::test_post_ruleset_with_null_tax_category_id - TypeError: Object of type Jurisdiction is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_non_existent_tax_category_id - TypeError: Object of type Jurisdiction is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_null_ordinal - TypeError: Object of type Jurisdiction is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_non_numeric_ordinal - TypeError: Object of type Jurisdiction is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_duplicate_tax_category_jurisdiction_combination - TypeError: Object of type Jurisdiction is not JSON serializable","comments":[{"id":"IC_kwDOJVY7Ys5uy7wu","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The create_mock_jurisdiction() helper method returns the jurisdiction object rather than just the id. This was being assigned directly to the jurisdiction_id variable in the test code. Updated the test code to access the id property of the returned jurisdiction.","createdAt":"2023-12-16T15:37:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/148#issuecomment-1858845742","viewerDidAuthor":true}],"number":148,"title":"Jurisdiction is not JSON serializable when POSTing rulesets","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/148"},{"body":"FAILED rules_api/test_views.py::test_post_ruleset_with_null_data - TypeError: create_ruleset() missing 1 required positional argument: 'ordinal'\r\nFAILED rules_api/test_views.py::test_post_ruleset_with_null_jurisdiction_id - TypeError: create_ruleset() missing 1 required positional argument: 'ordinal'","comments":[{"id":"IC_kwDOJVY7Ys5uy7cw","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was occurring because the endpoint was not expecting ordinal in the request body and the test was not sending it. Updated both the endpoint and the test to include ordinal in the payload and handle this as expected.","createdAt":"2023-12-16T15:32:28Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/147#issuecomment-1858844464","viewerDidAuthor":true}],"number":147,"title":"Tests for POST ruleset endpoint fail with \"TypeError: create_ruleset() missing 1 required positional argument: 'ordinal'\" ","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/147"},{"body":"FAILED rules_api/test_views.py::test_put_rule_tier_with_null_min_value - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_min_value - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_max_value - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_max_value - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_ordinal - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_ordinal - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_null_tier_rate - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_rule_tier_with_non_numeric_tier_rate - AttributeError: 'int' object has no attribute 'id'\r\nFAILED rules_api/test_views.py::test_put_valid_rule_tier - AttributeError: 'int' object has no attribute 'id'","comments":[{"id":"IC_kwDOJVY7Ys5uy6vN","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The tests were using the create_rule_tier() service to create the tier before updating. This service returns the id of the object rather than the object itself. The test was then attempting to access the id property on this result. Updated the test code to accept the tier_id directly from the service.","createdAt":"2023-12-16T15:18:15Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/146#issuecomment-1858841549","viewerDidAuthor":true}],"number":146,"title":"PUT rule tier tests failing with AttributeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/146"},{"body":"FAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_primary_rule_id - AttributeError: 'NoneType' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_existent_primary_rule_id - AttributeError: 'int' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_numeric_primary_rule_id - AttributeError: 'str' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_crete_secondary_tiered_rate_rule_with_null_name - AttributeError: 'int' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_ordinal - AttributeError: 'int' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_numeric_ordinal - AttributeError: 'int' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_nulL_explainer - AttributeError: 'int' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_variable_name - AttributeError: 'int' object has no attribute 'ruleset'\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_tiered_rate_rule - AttributeError: 'int' object has no attribute 'ruleset'","comments":[{"id":"IC_kwDOJVY7Ys5uz17D","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Changed: ruleset_id = primary_rule_id.ruleset.id\r\nTo: ruleset_id = primary_rule.ruleset.id","createdAt":"2023-12-17T09:22:34Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/145#issuecomment-1859083971","viewerDidAuthor":true}],"number":145,"title":"POST secondary_tiered_rate_rule tests failing with AttributeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/145"},{"body":"FAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_data - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_rule_id - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_non_existent_rule_id - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_non_numeric_rule_id - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_iered_rate_rule_with_null_name - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_ordinal - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_non_numeric_ordinal - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_nulL_explainer - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_secondary_tiered_rate_rule_with_null_variable_name - AssertionError: assert 'dividends' == 'salary'\r\nFAILED rules_api/test_views.py::test_put_valid_secondary_tiered_rate_rule - AssertionError: assert 'dividends' == 'salary'","comments":[{"id":"IC_kwDOJVY7Ys5uy5-_","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test had created the secondary tiered rate rule with a variable_name of 'dividends' but was checking to ensure the created rule had a variable_name of 'salary'. Updated the assertion to expect 'dividends'.","createdAt":"2023-12-16T15:02:19Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/144#issuecomment-1858838463","viewerDidAuthor":true}],"number":144,"title":"Testing updates to secondary tiered rate rules failing with \"AssertionError: assert 'dividends' == 'salary'\"","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/144"},{"body":"FAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_existent_tier_id - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_null_tier_rate - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_numeric_tier_rate - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_valid_secondary_rule_tier - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_existent_rule_id - assert 405 == 404\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_name - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_ordinal - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_ordinal - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_nulL_explainer - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_variable_name - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_flat_rate - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_flat_rate - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_negative_flat_rate - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_valid_flat_rate_rule - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_existent_rule_id - assert 405 == 404\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_name - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_ordinal - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_numeric_ordinal - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_nulL_explainer - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_variable_name - assert 405 == 400\r\nFAILED rules_api/test_views.py::test_patch_valid_tiered_rate_rule - assert 405 == 200\r\nFAILED rules_api/test_views.py::test_patch_rule_tier_with_non_existent_tier_id - assert 405 == 404","comments":[{"id":"IC_kwDOJVY7Ys5uy5WO","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The endpoints expect PUT rather than PATCH to update objects. Additionally, the URL used by the tests to patch flat_rate_rules excluded the rule ID so requests were routed to the RuleList rather than the RuleDetail view which does not support PUT requests.","createdAt":"2023-12-16T14:49:14Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/143#issuecomment-1858835854","viewerDidAuthor":true}],"number":143,"title":"Rule API - Patch endpoints unexpectedly returning 405 errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/143"},{"body":"FAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_existent_ruleset_id - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_crete_flat_rate_rule_with_null_name - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_ordinal - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_ordinal - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_nulL_explainer - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_variable_name - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_flat_rate - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_flat_rate - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_negative_flat_rate - TypeError: Object of type Response is not JSON serializable\r\nFAILED rules_api/test_views.py::test_post_valid_flat_rate_rule - TypeError: Object of type Response is not JSON serializable","comments":[{"id":"IC_kwDOJVY7Ys5uy4mt","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Private methods to post/put flat rate and secondary tiered rate rules were returning Response objects in response to validation issues. Updated this to raise errors instead and added error handling to the main post methods.","createdAt":"2023-12-16T14:34:11Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/142#issuecomment-1858832813","viewerDidAuthor":true}],"number":142,"title":"Rule API - TypeError: Object of type Response is not JSON serializable","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/142"},{"body":"FAILED rules_api/test_views.py::test_delete_ruleset_with_null_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_delete_ruleset - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_valid_tax_category - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_delete_tax_category_with_null_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_delete_tax_category - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_delete_rule_with_null_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_delete_rule_with_non_existent_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_delete_rule - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_ruleset_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_ruleset_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_existent_rule_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_name - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_ordinal - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_ordinal - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_nulL_explainer - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_variable_name - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_null_flat_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_non_numeric_flat_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_flat_rate_rule_with_negative_flat_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_valid_flat_rate_rule - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_ruleset_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_non_numeric_ruleset_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_variable_name - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_valid_tiered_rate_rule - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_existent_rule_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_name - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_ordinal - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_non_numeric_ordinal - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_nulL_explainer - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_tiered_rate_rule_with_null_variable_name - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_valid_tiered_rate_rule - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_existent_rule_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_min_value - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_min_value - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_max_value - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_max_value - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_ordinal - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_ordinal - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_tier_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_tier_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_valid_rule_tier - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_rule_tier_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_rule_tier_with_null_tier_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_rule_tier_with_non_existent_tier_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_rule_tier_with_non_numeric_tier_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_null_ruleset_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_numeric_ruleset_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_rule_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_primary_tier_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_primary_tier_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_primary_tier_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_tier_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_tier_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_null_data - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_null_tier_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_existent_tier_id - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_numeric_tier_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_null_tier_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_secondary_rule_tier_with_non_numeric_tier_rate - AttributeError: 'Response' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_patch_valid_secondary_rule_tier - AttributeError: 'Response' object has no attribute 'status'","comments":[{"id":"IC_kwDOJVY7Ys5uy3u-","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The correct attribute name is 'status_code' rather than status. Updated the test code accordingly.","createdAt":"2023-12-16T14:16:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/141#issuecomment-1858829246","viewerDidAuthor":true}],"number":141,"title":" AttributeError: 'HttpResponseNotFound' / 'Response' object has no attribute 'status'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/141"},{"body":"FAILED rules_api/test_views.py::test_post_rule_tier_with_non_existent_rule_id - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_min_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_min_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_max_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_max_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_ordinal - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_ordinal - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_tier_rate - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_tier_rate - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_valid_rule_tier - TypeError: RuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_rule_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_primary_tier_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_primary_tier_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_primary_tier_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_tier_rate - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'","comments":[{"id":"IC_kwDOJVY7Ys5uy3Xz","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The POST RuleTier and SecondaryRuleTier endpoints were not expecting to receive the rule_pk parameter, instead expecting to receive this through the JSON body of the request. Updated both endpoints to accept the rule_pk parameter.","createdAt":"2023-12-16T14:09:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/140#issuecomment-1858827763","viewerDidAuthor":true}],"number":140,"title":"FAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_rule_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'rule_pk'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/140"},{"body":"FAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_existent_ruleset_id - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_crete_flat_rate_rule_with_null_name - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_ordinal - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_ordinal - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_nulL_explainer - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_variable_name - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_null_flat_rate - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_non_numeric_flat_rate - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_flat_rate_rule_with_negative_flat_rate - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_valid_flat_rate_rule - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_non_existent_ruleset_id - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_crete_tiered_rate_rule_with_null_name - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_ordinal - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_non_numeric_ordinal - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_nulL_explainer - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_tiered_rate_rule_with_null_variable_name - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_existent_rule_id - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_min_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_min_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_max_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_max_value - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_ordinal - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_ordinal - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_null_tier_rate - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_rule_tier_with_non_numeric_tier_rate - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_valid_rule_tier - TypeError: RuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_tiered_rate_rule_with_non_existent_ruleset_id - TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_rule_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_rule_id - AttributeError: 'HttpResponseNotFound' object has no attribute 'status'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_primary_tier_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_existent_primary_tier_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_primary_tier_id - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_null_tier_rate - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'\r\nFAILED rules_api/test_views.py::test_post_valid_secondary_rule_tier - TypeError: SecondaryRuleTiersList.post() got an unexpected keyword argument 'ruleset_pk'","comments":[{"id":"IC_kwDOJVY7Ys5uy26-","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The post rule and post tiers did not expect the ruleset_pk parameter. Updated both endpoints to accept this as a parameter.","createdAt":"2023-12-16T14:01:35Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/139#issuecomment-1858825918","viewerDidAuthor":true}],"number":139,"title":"TypeError: RuleList.post() got an unexpected keyword argument 'ruleset_pk'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/139"},{"body":"FAILED rules_api/test_calculations.py::test_create_calculation_with_multiple_single_rule_jurisdictions - assert 4000.0 == 3280.0","comments":[{"id":"IC_kwDOJVY7Ys5uytQm","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test code was incorrectly calculating the expected result from the second jurisdiction.","createdAt":"2023-12-16T10:41:38Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/138#issuecomment-1858786342","viewerDidAuthor":true}],"number":138,"title":"Testing multi jurisdiction calculations fails with assert error.","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/138"},{"body":"FAILED rules_api/test_calculations.py::test_create_calculation_with_multiple_single_rule_jurisdictions - django.db.utils.IntegrityError: UNIQUE constraint failed: rules_api_taxcategory.name","comments":[{"id":"IC_kwDOJVY7Ys5uytBT","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was occurring because two rulesets were being created one for each jurisdiction. The create_mock_ruleset() helper creates a tax category with a static hard-coded name. Added a count of existing tax categories to the end of this name to disambiguate.","createdAt":"2023-12-16T10:36:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/137#issuecomment-1858785363","viewerDidAuthor":true}],"number":137,"title":"Creating multi-jurisdictional calculations fails with IntegrityError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/137"},{"body":"FAILED rules_api/test_calculations.py::test_create_calculation_with_no_jurisdictions - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uys1a","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional validation to the create_calculation service to check for empty lists of jurisdiction_ids or non-integer jurisdiction ids.","createdAt":"2023-12-16T10:31:42Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/136#issuecomment-1858784602","viewerDidAuthor":true}],"number":136,"title":"Creating a calculation with no jurisdictions fails to raise ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/136"},{"body":"FAILED rules_api/test_calculations.py::test_create_calculation_with_single_jurisdiction - assert 200.0 == 1800.0","comments":[{"id":"IC_kwDOJVY7Ys5uyr88","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test was incorrectly calculating the expected result as the tier rate applied to the whole salary as opposed to just the portion of the salary that fell within the tier. Updated the test accordingly.","createdAt":"2023-12-16T10:12:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/135#issuecomment-1858780988","viewerDidAuthor":true}],"number":135,"title":"Incorrect calculation result produced when checking the results of a single tier, single jurisdiction calculation","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/135"},{"body":"FAILED rules_api/test_calculations.py::test_create_calculation_with_single_jurisdiction - assert 0 == 1","comments":[{"id":"IC_kwDOJVY7Ys5uyr2t","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This is because the default salary value used by the create_mock_variable_table() helper is 9000 which falls below the 10k min tier value used in the same test. Therefore, no result is generated as the tier doesn't get applied. Updated the min_value for the tier to 8000.","createdAt":"2023-12-16T10:10:13Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/134#issuecomment-1858780589","viewerDidAuthor":true}],"number":134,"title":"Checking the results of a single jurisdiction calculation fails with AssertionError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/134"},{"body":"FAILED rules_api/test_calculations.py::test_get_calculations_for_valid_username - AttributeError: 'RelatedManager' object has no attribute 'results'\r\nFAILED rules_api/test_calculations.py::test_create_calculation_with_single_jurisdiction - AttributeError: 'RelatedManager' object has no attribute 'results'","comments":[{"id":"IC_kwDOJVY7Ys5uyrr9","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Changed the following line in both tests:\r\nassert calculation.results.results.count() == 1\r\n\r\nto this:\r\nassert calculation.results.first().results.count() == 1","createdAt":"2023-12-16T10:07:06Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/133#issuecomment-1858779901","viewerDidAuthor":true}],"number":133,"title":"Tests failing with AttributeError when checking calculation results in rules API","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/133"},{"body":"FAILED rules_api/test_calculations.py::test_get_calculations_for_null_username - Failed: DID NOT RAISE <class 'rules_api.models.TaxCalculationResult.DoesNotExist'>\r\nFAILED rules_api/test_calculations.py::test_get_calculations_for_non_existent_username - Failed: DID NOT RAISE <class 'rules_api.models.TaxCalculationResult.DoesNotExist'>","comments":[{"id":"IC_kwDOJVY7Ys5uyrEI","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to expect a zero-length list of calculations instead. This is more appropriate given that the rules API has no way of distinguishing between valid users with no calculations and non-existent users.","createdAt":"2023-12-16T09:54:19Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/132#issuecomment-1858777352","viewerDidAuthor":true}],"number":132,"title":"Retrieving calculations for invalid username fails to raise DoesNotExist error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/132"},{"body":"FAILED rules_api/test_services.py::test_update_rule_tier_with_null_max_value - assert 10000 == 9000\r\nFAILED rules_api/test_services.py::test_update_valid_rule_tier - assert 10000 == 9000","comments":[{"id":"IC_kwDOJVY7Ys5uyqAC","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test was not reloading the object from the database after updating it.","createdAt":"2023-12-16T09:29:15Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/131#issuecomment-1858772994","viewerDidAuthor":true}],"number":131,"title":"Assertion errors occur when testing rule tier updates","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/131"},{"body":"FAILED rules_api/test_services.py::test_create_rule_tier_with_null_max_value - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_max_value - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uypt5","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This is because a null max value on a rule tier is valid, since this allows for the top-end tier to apply to an infinitely-high value (e.g., \"taxed 45% on anything over £100k\"). Updated the tests to treat this as a valid update.","createdAt":"2023-12-16T09:23:18Z","includesCreatedEdit":true,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/130#issuecomment-1858771833","viewerDidAuthor":true}],"number":130,"title":"Creating and updating rule tiers with null max values fails to raise validation errors.","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/130"},{"body":"FAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_nulL_explainer - TypeError: cannot unpack non-iterable int object\r\nFAILED rules_api/test_services.py::test_create_valid_tiered_rate_rule - TypeError: cannot unpack non-iterable int object\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_nulL_explainer - TypeError: cannot unpack non-iterable int object\r\nFAILED rules_api/test_services.py::test_create_valid_secondary_tiered_rate_rule - TypeError: cannot unpack non-iterable int object","comments":[{"id":"IC_kwDOJVY7Ys5uypoN","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was due to id being passed into objects.get() as a positional rather than a keyword parameter.","createdAt":"2023-12-16T09:21:20Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/129#issuecomment-1858771469","viewerDidAuthor":true}],"number":129,"title":"Multiple tests are failing with 'TypeError: cannot unpack non-iterable int object'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/129"},{"body":"FAILED rules_api/test_services.py::test_update_secondary_iered_rate_rule_with_null_name - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_ordinal - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_numeric_ordinal - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_nulL_explainer - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_variable_name - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value\r\nFAILED rules_api/test_services.py::test_update_valid_secondary_tiered_rate_rule - rules_api.models.TieredRateRule.DoesNotExist: primary_rule_id must be a non-negative integer value","comments":[{"id":"IC_kwDOJVY7Ys5uypU2","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"When creating the mock_tiered_rate_rule, the rule object rather than the id was being allocated in the test code to primary_rule_id.","createdAt":"2023-12-16T09:14:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/128#issuecomment-1858770230","viewerDidAuthor":true}],"number":128,"title":"Updating secondary tiered rate rule tests fail with unexpected DoesNotExist errors.","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/128"},{"body":"FAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_nulL_explainer - TypeError: Field 'id' expected a number but got <built-in function id>.\r\nFAILED rules_api/test_services.py::test_update_valid_tiered_rate_rule - TypeError: Field 'id' expected a number but got <built-in function id>.\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_nulL_explainer - TypeError: Field 'id' expected a number but got <built-in function id>.\r\nFAILED rules_api/test_services.py::test_update_valid_secondary_tiered_rate_rule - TypeError: Field 'id' expected a number but got <built-in function id>.\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_numeric_primary_tier_id - ValueError: Field 'id' expected a number but got 'ABC'.\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_numeric_primary_rule_id - ValueError: Field 'id' expected a number but got 'ABC'.","comments":[{"id":"IC_kwDOJVY7Ys5uypJG","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The first four failures were due to the test passing a non-existent id variable into the objects.get() method as opposed to the correct rule_id variable.\r\nThe final two failures were due to missing validation for non-numeric primary ids in the services.\r\n","createdAt":"2023-12-16T09:11:30Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/127#issuecomment-1858769478","viewerDidAuthor":true}],"number":127,"title":"Multiple tests are throwing unexpected TypeErrors on field 'id'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/127"},{"body":"FAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_data - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_rule_id - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_existent_rule_id - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_numeric_rule_id - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_iered_rate_rule_with_null_name - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_ordinal - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_numeric_ordinal - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_nulL_explainer - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_variable_name - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'\r\nFAILED rules_api/test_services.py::test_update_valid_secondary_tiered_rate_rule - TypeError: update_secondary_tiered_rate_rule() missing 1 required positional argument: 'tax_rate'","comments":[{"id":"IC_kwDOJVY7Ys5uyoX-","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Removed the unnecessary parameter from the update_secondary_tiered_rate_rule() service.","createdAt":"2023-12-16T08:58:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/126#issuecomment-1858766334","viewerDidAuthor":true}],"number":126,"title":"The update_secondary_tiered_rate_rule incorrectly expects a tax rate parameter","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/126"},{"body":"FAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_data - rules_api.models.RuleSet.DoesNotExist: ruleset_id must be a non-negative integer value\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_rule_id - Failed: DID NOT RAISE <class 'rules_api.models.TieredRateRule.DoesNotExist'>\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_non_existent_rule_id - rules_api.models.Rule.DoesNotExist: Rule matching query does not exist.\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_null_max_value - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_max_value - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_rule_id - rules_api.models.TieredRateRule.DoesNotExist: TieredRateRule matching query does not exist.\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_existent_rule_id - rules_api.models.TieredRateRule.DoesNotExist: TieredRateRule matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uyoQn","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Update tests for TieredRateRules and SecondaryTieredRateRules were creating records with invalid data rather than with valid data and then updating with invalid data.\r\nAdditionally, the create_rule_tier service was accessing tiered rate rules via the generic Rule class rather than via the TieredRateRule class, so Rule.DoesNotExist was being raised instead of TieredRateRule.DoesNotExist.\r\nSimilarly, the update secondary tiered rate rule service was accessing FlatRateRule objects. This was updated to SecondaryTieredRateRule objects.","createdAt":"2023-12-16T08:55:39Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/125#issuecomment-1858765863","viewerDidAuthor":true}],"number":125,"title":"Multiple tests are returning unexpected results for DoesNotExist cases","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/125"},{"body":"FAILED rules_api/test_services.py::test_create_rule_tier_with_non_existent_rule_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_null_min_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_non_numeric_min_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_null_max_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_non_numeric_max_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_null_ordinal - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_non_numeric_ordinal - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_null_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_rule_tier_with_non_numeric_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_valid_rule_tier - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_data - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_tier_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_non_existent_tier_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_non_numeric_tier_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_min_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_non_numeric_min_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_max_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_non_numeric_max_value - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_ordinal - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_non_numeric_ordinal - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_null_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_rule_tier_with_non_numeric_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_valid_rule_tier - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_existent_rule_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_null_primary_tier_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_existent_primary_tier_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_numeric_primary_tier_id - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_null_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_create_valid_secondary_rule_tier - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_secondary_rule_tier_with_null_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_secondary_rule_tier_with_non_numeric_tier_rate - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'\r\nFAILED rules_api/test_services.py::test_update_valid_secondary_rule_tier - TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'","comments":[{"id":"IC_kwDOJVY7Ys5ux8he","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Removed the custom validation to check that numeric values are positive, relying on the MinValueValidator instead.\r\nAlso, several tests are assigning rulesets to rule_id variables so updated the code to assign the id of the ruleset instead of the ruleset object.","createdAt":"2023-12-15T22:59:11Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/124#issuecomment-1858586718","viewerDidAuthor":true}],"number":124,"title":"TypeError: '<' not supported between instances of 'builtin_function_or_method' and 'int'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/124"},{"body":"FAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_null_data - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_null_ruleset_id - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_non_numeric_ruleset_id - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_nulL_explainer - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_valid_tiered_rate_rule - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_data - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_ordinal - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_non_numeric_ordinal - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_data - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_ruleset_id - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_numeric_ruleset_id - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_data - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_ordinal - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_numeric_ordinal - django.core.exceptions.ValidationError: ['ordinal must be a non-negative integer value']","comments":[{"id":"IC_kwDOJVY7Ys5uxpLy","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated all services and their tests to raise and expect DoesNotExist errors when accessing entities with null or non-numeric IDs.","createdAt":"2023-12-15T21:24:27Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/123#issuecomment-1858507506","viewerDidAuthor":true}],"number":123,"title":"Creating or updating with negative or non-numeric ids or ordinals causes multiple tests to fail with unexpected ValidationErrors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/123"},{"body":"FAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_null_data - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_null_ruleset_id - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_non_existent_ruleset_id - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_non_numeric_ruleset_id - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_crete_tiered_rate_rule_with_null_name - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_null_ordinal - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_non_numeric_ordinal - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_nulL_explainer - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_tiered_rate_rule_with_null_variable_name - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_valid_tiered_rate_rule - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_data - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_rule_id - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_non_numeric_rule_id - ValueError: Field 'id' expected a number but got 'ABC'.\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_name - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_ordinal - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_non_numeric_ordinal - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_nulL_explainer - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_tiered_rate_rule_with_null_variable_name - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_update_valid_tiered_rate_rule - TypeError: create_tiered_rate_rule() takes 4 positional arguments but 5 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_data - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_ruleset_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_existent_ruleset_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_numeric_ruleset_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_primary_rule_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_existent_primary_rule_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given \r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_numeric_primary_rule_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given \r\nFAILED rules_api/test_services.py::test_crete_secondary_tiered_rate_rule_with_null_name - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_ordinal - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_non_numeric_ordinal - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_nulL_explainer - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_secondary_tiered_rate_rule_with_null_variable_name - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_data - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_rule_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_existent_rule_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_numeric_rule_id - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_iered_rate_rule_with_null_name - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_ordinal - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_non_numeric_ordinal - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_nulL_explainer - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_secondary_tiered_rate_rule_with_null_variable_name - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_update_valid_secondary_tiered_rate_rule - TypeError: create_secondary_tiered_rate_rule() takes 5 positional arguments but 6 were given","comments":[{"id":"IC_kwDOJVY7Ys5uxju_","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added missing ruleset attribute to create tiered rate and create secondary tiered rate rule services.","createdAt":"2023-12-15T21:04:39Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/122#issuecomment-1858485183","viewerDidAuthor":true}],"number":122,"title":"Missing attributes on create and update tiered rule/rule tier services","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/122"},{"body":"FAILED rules_api/test_services.py::test_update_flat_rate_rule_with_nulL_explainer - TypeError: Field 'id' expected a number but got <built-in function id>.\r\nFAILED rules_api/test_services.py::test_update_valid_flat_rate_rule - TypeError: Field 'id' expected a number but got <built-in function id>.","comments":[{"id":"IC_kwDOJVY7Ys5uxhnQ","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test variable holding the id of the rule to update is rule_id, but id is being used to retrieve the rule for checking following the update. Changed the test to use rule_id instead.","createdAt":"2023-12-15T20:56:06Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/121#issuecomment-1858476496","viewerDidAuthor":true}],"number":121,"title":"Updating flat rate rule tests failing with unexpected TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/121"},{"body":"FAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_data - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_ruleset_id - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_non_numeric_ruleset_id - django.core.exceptions.ValidationError: ['ruleset_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_flat_rate_rule_with_null_data - django.core.exceptions.ValidationError: ['rule_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_flat_rate_rule_with_null_rule_id - django.core.exceptions.ValidationError: ['rule_id must be a non-negative integer value']\r\nFAILED rules_api/test_services.py::test_update_flat_rate_rule_with_non_numeric_rule_id - django.core.exceptions.ValidationError: ['rule_id must be a non-negative integer value']","comments":[{"id":"IC_kwDOJVY7Ys5uxgW7","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to expect ValidationErrors instead of DoesNotExist errors. This is because the services should validate that the type of data being provided is valid before it attempts to retrieve the referenced entity from the database.","createdAt":"2023-12-15T20:50:48Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/120#issuecomment-1858471355","viewerDidAuthor":true}],"number":120,"title":"Creating or updating flat rate rules with null or non-numeric ids raises unexpected ValidationErrors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/120"},{"body":"FAILED rules_api/test_services.py::test_create_flat_rate_rule_with_non_numeric_ruleset_id - ValueError: Field 'id' expected a number but got 'ABC'.\r\nFAILED rules_api/test_services.py::test_update_flat_rate_rule_with_non_numeric_rule_id - ValueError: Field 'id' expected a number but got 'ABC'.","comments":[{"id":"IC_kwDOJVY7Ys5uxen9","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional validation to the create_ and update_flat_rate_rule services.","createdAt":"2023-12-15T20:45:06Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/119#issuecomment-1858464253","viewerDidAuthor":true}],"number":119,"title":"Creating or updating flat rate rules with non-numeric ids raises ValueError instead of validation error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/119"},{"body":"FAILED rules_api/test_services.py::test_create_flat_rate_rule_with_negative_flat_rate - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED rules_api/test_services.py::test_update_flat_rate_rule_with_negative_flat_rate - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uxduI","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added MinValueValidator constraints to the flat_rate attribute.","createdAt":"2023-12-15T20:40:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/118#issuecomment-1858460552","viewerDidAuthor":true}],"number":118,"title":"Creating or updating flat rate rule with a negative flat rate does not raise the expected ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/118"},{"body":"FAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_data - rules_api.models.RuleSet.DoesNotExist: RuleSet matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uxcg8","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test was incorrectly expecting a validation error. Updated to expect RuleSet.DoesNotExist.","createdAt":"2023-12-15T20:35:22Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/117#issuecomment-1858455612","viewerDidAuthor":true}],"number":117,"title":"Creating flat rate rule with null data fails despite raising expected Ruleset.DoesNotExist error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/117"},{"body":"FAILED rules_api/test_services.py::test_create_flat_rate_rule_with_nulL_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED rules_api/test_services.py::test_update_flat_rate_rule_with_nulL_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}","comments":[{"id":"IC_kwDOJVY7Ys5uxb1I","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the explainer attribute on rules to accept null/blank values.","createdAt":"2023-12-15T20:32:19Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/116#issuecomment-1858452808","viewerDidAuthor":true}],"number":116,"title":"Creating and deleting flat rate rules with null explainers raises unexpected validation error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/116"},{"body":"FAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_data - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_ruleset_id - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_non_existent_ruleset_id - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_non_numeric_ruleset_id - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_crete_flat_rate_rule_with_null_name - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_ordinal - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_non_numeric_ordinal - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_nulL_explainer - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_variable_name - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_null_flat_rate - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_non_numeric_flat_rate - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_flat_rate_rule_with_negative_flat_rate - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given\r\nFAILED rules_api/test_services.py::test_create_valid_flat_rate_rule - TypeError: create_flat_rate_rule() takes 5 positional arguments but 6 were given","comments":[{"id":"IC_kwDOJVY7Ys5uxY68","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added ruleset_id as a parameter of the create_flat_rate_rule service.","createdAt":"2023-12-15T20:19:42Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/115#issuecomment-1858440892","viewerDidAuthor":true}],"number":115,"title":"The create_flat_rate_rule service does not accept the required ruleset parameter","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/115"},{"body":"FAILED rules_api/test_services.py::test_delete_rule - TypeError: Field 'id' expected a number but got <FlatRateRule: Test Jurisdiction 0 - Test Category - Rule Test>.","comments":[{"id":"IC_kwDOJVY7Ys5uxXCR","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test_delete_rule test sets up a rule to delete my calling create_mock_flat_rate_rule(). This helper returns the rule object instead of the id. Fixed the test code by setting the rule_id variable to be the the id attribute on the returned object.","createdAt":"2023-12-15T20:11:34Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/114#issuecomment-1858433169","viewerDidAuthor":true}],"number":114,"title":"Deleting a rule raises an unexpected TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/114"},{"body":"FAILED rules_api/test_services.py::test_create_tax_category_with_duplicate_name - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uxWCF","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a unique constraint to the tax category name attribute.","createdAt":"2023-12-15T20:07:25Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/113#issuecomment-1858429061","viewerDidAuthor":true}],"number":113,"title":"Creating tax category with duplicate name fails to raise expected ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/113"},{"body":"FAILED rules_api/test_services.py::test_delete_ruleset_with_null_id - Failed: DID NOT RAISE <class 'rules_api.models.RuleSet.DoesNotExist'>\r\nFAILED rules_api/test_services.py::test_delete_ruleset_with_non_existent_id - Failed: DID NOT RAISE <class 'rules_api.models.RuleSet.DoesNotExist'>","comments":[{"id":"IC_kwDOJVY7Ys5uxUMn","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The delete_ruleset() service calls delete() on a queryset which is filtered by primary key. A queryset may be empty so does not return a DoesNotExist error. Updated the service to retrieve the ruleset using get() instead of filter() and then call delete on the specific object.","createdAt":"2023-12-15T20:00:57Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/112#issuecomment-1858421543","viewerDidAuthor":true}],"number":112,"title":"Deleting ruleset with non-existent or null IDs fails to raise expected DoesNotExist error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/112"},{"body":"FAILED rules_api/test_services.py::test_create_ruleset_with_duplicate_tax_category_jurisdiction_combination - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED rules_api/test_services.py::test_create_ruleset_with_negative_ordinal - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uxSct","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a MinValueValidator constraint to the ordinal attribute and added a validation check in the create_ruleset service to ensure that the new ruleset is unique for the tax category/jurisdiction combination","createdAt":"2023-12-15T19:53:55Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/111#issuecomment-1858414381","viewerDidAuthor":true}],"number":111,"title":"Create ruleset service does not raise expected validation errors for duplicate tax category/jurisdiction combos or negative ordinals","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/111"},{"body":"FAILED rules_api/test_services.py::test_create_ruleset_with_duplicate_tax_category_jurisdiction_combination - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED rules_api/test_services.py::test_create_valid_ruleset - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}","comments":[{"id":"IC_kwDOJVY7Ys5uxQ9J","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The create ruleset service did not take ordinal as a parameter but this is a required field on the Ruleset model. Tests also were not passing the ordinal parameter to the service. Added the parameter to both the tests and the service.","createdAt":"2023-12-15T19:48:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/110#issuecomment-1858408265","viewerDidAuthor":true}],"number":110,"title":"Create ruleset tests cause unexpected validation errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/110"},{"body":"FAILED rules_api/test_services.py::test_create_ruleset_with_duplicate_tax_category_jurisdiction_combination - IntegrityError","comments":[{"id":"IC_kwDOJVY7Ys5uxODH","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"All rule API services are writing to the database without validating data against model constraints first. Updated all rule API services to use full_clean() and save() rather than objects.create()","createdAt":"2023-12-15T19:38:07Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/109#issuecomment-1858396359","viewerDidAuthor":true}],"number":109,"title":"Creating ruleset with duplicate tax category/jurisdiction combination returns unexpected integrity error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/109"},{"body":"FAILED rules_api/test_services.py::test_create_ruleset_with_null_tax_category_id - django.core.exceptions.ValidationError: ['jurisdiction_id must be a valid (non-negative, non-null) integer']\r\nFAILED rules_api/test_services.py::test_create_ruleset_with_non_existent_tax_category_id - django.core.exceptions.ValidationError: ['jurisdiction_id must be a valid (non-negative, non-null) integer']","comments":[{"id":"IC_kwDOJVY7Ys5uw48y","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"create_mock_jurisdiction returns the jurisdiction object as opposed to just the id so jurisdiction_id was being set to hold the object rather than the id. Changed jurisdiction_id = create_mock_jurisdiction() to jurisdiction_id = create_mock_jurisdiction().id","createdAt":"2023-12-15T18:22:08Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/108#issuecomment-1858309938","viewerDidAuthor":true}],"number":108,"title":"Tests to create rulesets with invalid tax category ids unexpectedly failing jurisdiction_id validation","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/108"},{"body":"FAILED rules_api/test_services.py::test_create_ruleset_with_null_jurisdiction_id - TypeError: QuerySet.create() takes 1 positional argument but 2 were given","comments":[{"id":"IC_kwDOJVY7Ys5uw2ho","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Tax category name was being passed as a positional argument instead of a keyword argument. Updated in all tests.","createdAt":"2023-12-15T18:13:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/107#issuecomment-1858300008","viewerDidAuthor":true}],"number":107,"title":"Creating ruleset with null jurisdiction_id raises a TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/107"},{"body":"FAILED rules_api/test_services.py::test_create_ruleset_with_null_data - rules_api.models.TaxCategory.DoesNotExist: TaxCategory matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uw1YR","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Additional validation was added to the create_ruleset service to check that jurisdiction_id is a non-negative, non-null integer.","createdAt":"2023-12-15T18:09:05Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/106#issuecomment-1858295313","viewerDidAuthor":true}],"number":106,"title":"Creating ruleset with null data returns unexpected TaxCategory does not exist","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/106"},{"body":"FAILED rules_api/test_models.py::test_secondary_tiered_rule_iteration_with_single_tier_defined - assert 2800 == 3000.0","comments":[{"id":"IC_kwDOJVY7Ys5uvkPE","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test assumed that in this scenario the first unit of secondary income would be taxed within this tier. However, as the primary income fell below the tier minimum, this was not the case. Updated the test to reflect the fact that the first £1000 would be taxed below the tier.","createdAt":"2023-12-15T14:21:30Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/105#issuecomment-1857962948","viewerDidAuthor":true}],"number":105,"title":"Testing secondary tiered rule with single tier fails AssertionError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/105"},{"body":"FAILED rules_api/test_models.py::test_secondary_tiered_rule_iteration_with_single_tier_defined - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_rule.ruleset_id","comments":[{"id":"IC_kwDOJVY7Ys5uvkDo","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Equality operator used to assign the primary rule's ruleset to the secondary rule. This was replaced with the assignment operator.","createdAt":"2023-12-15T14:20:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/104#issuecomment-1857962216","viewerDidAuthor":true}],"number":104,"title":"Testing secondary tiered rule with single tier fails with IntegrityError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/104"},{"body":"FAILED rules_api/test_models.py::test_ruleset_iteration_with_multiple_rules_defined - assert 1 == 2","comments":[{"id":"IC_kwDOJVY7Ys5uvj6L","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test was setting the salary to 9000 which was below the min_value for the tiered rate rule. The tiered rate rule was therefore not being applied. Increased the salary to 30000","createdAt":"2023-12-15T14:20:32Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/103#issuecomment-1857961611","viewerDidAuthor":true}],"number":103,"title":"Testing ruleset iteration with multiple rules fails as only one result created","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/103"},{"body":"FAILED rules_api/test_models.py::test_ruleset_iteration_with_no_rules_defined - AssertionError: assert 1 == 0","comments":[{"id":"IC_kwDOJVY7Ys5uvjwL","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added check to ensure rules exist within the ruleset before creating the RuleSet result","createdAt":"2023-12-15T14:20:05Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/102#issuecomment-1857960971","viewerDidAuthor":true}],"number":102,"title":"Testing ruleset iteration with no rules fails as test result created","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/102"},{"body":"FAILED rules_api/test_models.py::test_tiered_rule_iteration_with_multiple_tiers_defined - assert 13499.550000000001 == 13499.55","comments":[{"id":"IC_kwDOJVY7Ys5uvjl6","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added rounding to the calculate method for RuleTiers to round to 2 dp.","createdAt":"2023-12-15T14:19:36Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/101#issuecomment-1857960314","viewerDidAuthor":true}],"number":101,"title":"Iterating over tiered rate rule with multiple tiers fails due with AssertionError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/101"},{"body":"FAILED rules_api/test_models.py::test_tiered_rule_iteration_with_multiple_tiers_defined - AssertionError: assert Decimal('13499.55') == 13499.55","comments":[{"id":"IC_kwDOJVY7Ys5uvjc1","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"TaxPayable and Tier Tax Rates are stored as a decimal value but floats are used outside of the Django models. Updated model to store tax_payable and variable_value and tier_rate as FloatField.","createdAt":"2023-12-15T14:19:09Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/100#issuecomment-1857959733","viewerDidAuthor":true}],"number":100,"title":"Iterating over tiered rate rule with multiple tiers fails due to DecimalField conversion","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/100"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_no_secondary_income - AssertionError: assert 1 == 0","comments":[{"id":"IC_kwDOJVY7Ys5uvjTm","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated SecondaryTieredRateRule to ignore tiers if no secondary income","createdAt":"2023-12-15T14:18:42Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/99#issuecomment-1857959142","viewerDidAuthor":true}],"number":99,"title":"Secondary tiered rate rule applies tiers where no secondary income","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/99"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - TypeError: TaxRuleSetResult.add_result() missing 1 required positional argument: 'variable_value'","comments":[{"id":"IC_kwDOJVY7Ys5uvjLE","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated SecondaryRuleTier to pass secondary income as variable value","createdAt":"2023-12-15T14:18:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/98#issuecomment-1857958596","viewerDidAuthor":true}],"number":98,"title":"Secondary rule tier calculate method not passing variable_value to add_result() method","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/98"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - NameError: name 'lower_limit' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uvjD8","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated reference to 'lower_limit' to use correct variable name ('tier_min')","createdAt":"2023-12-15T14:17:57Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/97#issuecomment-1857958140","viewerDidAuthor":true}],"number":97,"title":"Secondary rule tier tests failing with NameError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/97"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - TypeError: SecondaryRuleTier.calculate() missing 1 required positional argument: 'ruleset_results'","comments":[{"id":"IC_kwDOJVY7Ys5uvia0","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the secondarytieredraterule calculate function to pass in both variables","createdAt":"2023-12-15T14:16:00Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/96#issuecomment-1857955508","viewerDidAuthor":true}],"number":96,"title":"Secondary rule was passing only the secondary income to the secondary tier calculate method","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/96"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - KeyError: ''","comments":[{"id":"IC_kwDOJVY7Ys5uviSD","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Helper function was not setting the variable_name on the secondary rule","createdAt":"2023-12-15T14:15:33Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/95#issuecomment-1857954947","viewerDidAuthor":true}],"number":95,"title":"No variable name found when calculating SecondaryTier result","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/95"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.core.exceptions.FieldError: Cannot resolve keyword 'ordinal' into field. Choices are: id, primary_tier, primary_tier_id, secondary_rule, secondary_rule_i...","comments":[{"id":"IC_kwDOJVY7Ys5uviGq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"SecondaryRuleTier has no ordinal so updated to order by the related primary tier ordinal","createdAt":"2023-12-15T14:15:01Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/94#issuecomment-1857954218","viewerDidAuthor":true}],"number":94,"title":"Secondary rule tier tests failing to sort tiers by ordinal","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/94"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.db.utils.IntegrityError: UNIQUE constraint failed: jurisdictions_api_jurisdiction.name","comments":[{"id":"IC_kwDOJVY7Ys5uvh5o","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added a count to the end of jurisdiction name to disambiguate","createdAt":"2023-12-15T14:14:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/93#issuecomment-1857953384","viewerDidAuthor":true}],"number":93,"title":"Secondary rule tier tests creating duplicate jurisdictions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/93"},{"body":"FAILED rules_api/test_models.py::test_secondary_tier_calculate_where_total_income_below_lower_boundary - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_rule.ordinal","comments":[{"id":"IC_kwDOJVY7Ys5uvhol","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The create_mock_secondary_Tiered_Rate_Rule helper function was not setting mandatory fields on the new rule","createdAt":"2023-12-15T14:13:33Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/92#issuecomment-1857952293","viewerDidAuthor":true}],"number":92,"title":"Secondary rule tier tests fail with IntegrityError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/92"},{"body":"FAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_below_boundary - AssertionError: assert 1 == 0","comments":[{"id":"IC_kwDOJVY7Ys5uvhhP","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The RuleTier was not checking to ensure the variable was above the min_value before applying itself","createdAt":"2023-12-15T14:13:10Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/91#issuecomment-1857951823","viewerDidAuthor":true}],"number":91,"title":"Rule tier tests fail when variable < min_value","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/91"},{"body":"TypeError: TaxRuleSetResult.add_result() missing 1 required positional argument: 'variable_value'","comments":[{"id":"IC_kwDOJVY7Ys5uvhU0","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the RuleTier to pass the variable_value to add_result","createdAt":"2023-12-15T14:12:35Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/90#issuecomment-1857951028","viewerDidAuthor":true}],"number":90,"title":"Rule tier tests fail with TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/90"},{"body":"FAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_below_boundary - TypeError: '<' not supported between instances of 'dict' and 'int'","comments":[{"id":"IC_kwDOJVY7Ys5uvhHW","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The TieredRateRule was passing the variable table rather than the variable to the tier","createdAt":"2023-12-15T14:11:59Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/89#issuecomment-1857950166","viewerDidAuthor":true}],"number":89,"title":"Rule tier tests fail with TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/89"},{"body":"FAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_below_boundary - rules_api.models.RuleTier.rule.RelatedObjectDoesNotExist: RuleTier has no rule.\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_on_lower_boundary - rules_api.models.RuleTier.rule.RelatedObjectDoesNotExist: RuleTier has no rule.\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_within_boundaries - rules_api.models.RuleTier.rule.RelatedObjectDoesNotExist: RuleTier has no rule.\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_on_upper_boundary - rules_api.models.RuleTier.rule.RelatedObjectDoesNotExist: RuleTier has no rule.\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_above_upper_boundary - rules_api.models.RuleTier.rule.RelatedObjectDoesNotExist: RuleTier has no rule.\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_no_upper_boundary_and_income_above_lower_boundary - rules_api.models.RuleTier.rule.RelatedObjectDoesNotExist: RuleTier has no rule.","comments":[{"id":"IC_kwDOJVY7Ys5uz2Jq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The rule was not being set on the rule tier. Updated the test code accordingly.","createdAt":"2023-12-17T09:27:01Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/88#issuecomment-1859084906","viewerDidAuthor":true}],"number":88,"title":"Rule tier tests fail with RelatedObjectDoesNotExist","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/88"},{"body":"FAILED rules_api/test_models.py::test_flat_rate_calculate - TypeError: object of type 'TaxRuleSetResult' has no len()","comments":[{"id":"IC_kwDOJVY7Ys5uvgn7","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test needed to be updated to reflect the new models for storing tax results as opposed to the old dictionary.","createdAt":"2023-12-15T14:10:25Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/87#issuecomment-1857948155","viewerDidAuthor":true}],"number":87,"title":"Flat rate rule test fails with TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/87"},{"body":"FAILED rules_api/test_models.py::test_flat_rate_calculate - django.db.utils.IntegrityError: NOT NULL constraint failed: rules_api_taxruletierresult.tax_rate","comments":[{"id":"IC_kwDOJVY7Ys5uvgah","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The TaxRuleSetResult was not setting the tax_rate when creating the TaxRuleTierResult","createdAt":"2023-12-15T14:09:47Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/86#issuecomment-1857947297","viewerDidAuthor":true}],"number":86,"title":"Flat rate rule test fails with IntegrityError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/86"},{"body":"FAILED rules_api/test_models.py::test_flat_rate_calculate - rules_api.models.Rule.ruleset.RelatedObjectDoesNotExist: Rule has no ruleset.. Did you mean: 'rule_ptr'?","comments":[{"id":"IC_kwDOJVY7Ys5uvgNk","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated test to create a fully instantiated ruleset and link this to the rule","createdAt":"2023-12-15T14:09:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/85#issuecomment-1857946468","viewerDidAuthor":true}],"number":85,"title":"Testing flat rate calculation fails with RelatedObjectDoesNotExist","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/85"},{"body":"FAILED rules_api/test_models.py::test_flat_rate_calculate - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_below_boundary - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_on_lower_boundary - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_within_boundaries - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_on_upper_boundary - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_income_above_upper_boundary - AttributeError: 'NoneType' object has no attribute 'add_result' \r\nFAILED rules_api/test_models.py::test_rule_tier_calculate_where_no_upper_boundary_and_income_above_lower_boundary - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_on_lower_boundary_and_total_within_boundaries - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_and_total_within_boundaries - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_within_boundaries_and_total_exceeds - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_on_upper_boundary_and_total_exceeds - AttributeError: 'NoneType' object has no attribute 'add_result'\r\nFAILED rules_api/test_models.py::test_secondary_tier_calculate_where_primary_income_above_upper_boundary - AttributeError: 'NoneType' object has no attribute 'add_result'","comments":[{"id":"IC_kwDOJVY7Ys5uvf_V","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The helper function to create mock Ruleset results was not returning the created result object","createdAt":"2023-12-15T14:08:27Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/84#issuecomment-1857945557","viewerDidAuthor":true}],"number":84,"title":"Rule model tests failing with AttributeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/84"},{"body":"FAILED rules_api/test_models.py::test_flat_rate_calculate - TypeError: 'int' object is not subscriptable","comments":[{"id":"IC_kwDOJVY7Ys5uvfi7","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Test is passing an int variable instead of a variable dictionary. Updated the test to correct this.","createdAt":"2023-12-15T14:07:28Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/83#issuecomment-1857943739","viewerDidAuthor":true}],"number":83,"title":"Rule model tests failing with TypeError 'int' is not subscriptable","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/83"},{"body":"When confirming a payment via the Stripe API, the payment completes synchronously rather than asynchronously with a webhook posted back to the payment API.","comments":[{"id":"IC_kwDOJVY7Ys5vjmDc","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the confirm_checkout view to remove synchronous updates to the subscription once payment is confirmed, thereby allowing the webhook to update subscriptions instead. Additionally, removed the succeeded attribute from the confirm payment API endpoint to allow for correct handling of Stripe's more granular payment intent statuses. Finally, resolved issues with the handling of payment webhooks which were preventing Stripe events from being correctly constructed when webhooks were received.","createdAt":"2023-12-28T22:41:10Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/82#issuecomment-1871601884","viewerDidAuthor":true}],"number":82,"title":"Payment confirmation and completion is happening synchronously rather than via the webhook","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/82"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - payments_api.models.Payment.DoesNotExist\r\nFAILED payments_api/test_services.py::test_process_payment_failure - payments_api.models.Payment.DoesNotExist","comments":[{"id":"IC_kwDOJVY7Ys5u0B11","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test code was updating the payment id variable to hold the result of the complete_payment/fail_payment services respectively which do not return a result. Modified the code to use the id received from the create_payment_service when setting up the test.","createdAt":"2023-12-17T10:35:21Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/81#issuecomment-1859132789","viewerDidAuthor":true}],"number":81,"title":"Valid process payment tests failing with Payment.DoesNotExist","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/81"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success_with_unknown_stripe_pid - Failed: DID NOT RAISE <class 'django.core.exceptions.ObjectDoesNotExist'>\r\nFAILED payments_api/test_services.py::test_process_payment_failure_with_unknown_stripe_pid - Failed: DID NOT RAISE <class 'django.core.exceptions.ObjectDoesNotExist'>","comments":[{"id":"IC_kwDOJVY7Ys5uT1to","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the tests to expect Payment.DoesNotExist, and updated code to check the number of payments matching the PID.","createdAt":"2023-12-11T18:56:00Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/80#issuecomment-1850694504","viewerDidAuthor":true}],"number":80,"title":"Processing payment with unknown stripe pid fails to raise expected error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/80"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - django.core.exceptions.FieldDoesNotExist: Payment has no field named 'created_or_failed_date'\r\nFAILED payments_api/test_services.py::test_process_payment_success_with_unknown_stripe_pid - django.core.exceptions.FieldDoesNotExist: Payment has no field named 'created_or_failed_date'\r\nFAILED payments_api/test_services.py::test_process_payment_failure - django.core.exceptions.FieldDoesNotExist: Payment has no field named 'created_or_failed_date'\r\nFAILED payments_api/test_services.py::test_process_payment_failure_with_unknown_stripe_pid - django.core.exceptions.FieldDoesNotExist: Payment has no field named 'created_or_failed_date'","comments":[{"id":"IC_kwDOJVY7Ys5uT0Jf","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Was attempting to access 'created_or_failed_date' in services. Updated to access 'completed_or_failed_date'","createdAt":"2023-12-11T18:51:39Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/79#issuecomment-1850688095","viewerDidAuthor":true}],"number":79,"title":"Process payment tests failing with FieldDoesNotExist error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/79"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - TypeError: Field 'id' expected a number but got (1, 'pi_3OMETKFkVBiDxSnk1zlGaQoh_secret_O8UJhoD0S96IDBSUFRTq6WH4Z').\r\nFAILED payments_api/test_services.py::test_process_payment_failure - TypeError: Field 'id' expected a number but got (1, 'pi_3OMETLFkVBiDxSnk1rejsgjD_secret_CWy4lbdYkrDq613loEjBYE9sS').","comments":[{"id":"IC_kwDOJVY7Ys5uTy7p","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"create_payment service returns two parameters, but only one was being collected.","createdAt":"2023-12-11T18:48:19Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/78#issuecomment-1850683113","viewerDidAuthor":true}],"number":78,"title":"Process payment tests failing with TypeError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/78"},{"body":"FAILED payments_api/test_services.py::test_process_payment_success - NameError: name 'APIClient' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uTxyx","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Imported APIClient from rest_framework.test","createdAt":"2023-12-11T18:45:20Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/77#issuecomment-1850678449","viewerDidAuthor":true}],"number":77,"title":"Process payment tests failing with NameError: 'APIClient'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/77"},{"body":"FAILED payments_api/test_services.py::test_create_payment_with_null_subscription_id - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uSi4F","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated test to expect this to succeed as model explicitly allows subscription to be null. This is because a subscription may not exist for the user until after payment has completed if this is a new customer.","createdAt":"2023-12-11T15:51:31Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/76#issuecomment-1850355205","viewerDidAuthor":true}],"number":76,"title":"Creation service test fails when passing a null subscription_id","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/76"},{"body":"FAILED payments_api/test_services.py::test_create_payment_with_null_data - TypeError: type NoneType doesn't define __round__ method\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_subtotal - TypeError: type NoneType doesn't define __round__ method","comments":[{"id":"IC_kwDOJVY7Ys5uSg5D","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added validation check to make sure total is a valid float before attempting to round.","createdAt":"2023-12-11T15:47:32Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/75#issuecomment-1850347075","viewerDidAuthor":true}],"number":75,"title":"Creation service test fails when passed null data and null subtotal with 'TypeError'","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/75"},{"body":"FAILED payments_api/test_services.py::test_create_payment_with_null_data - django.core.exceptions.ValidationError: {'subscription_option_id': ['This field cannot be null.'], 'total': ['This field cannot be null.'], 'currency': ['This field cannot be null.']}\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_subscription_id - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_months - django.core.exceptions.ValidationError: {'subscription_option_id': ['This field cannot be null.'], 'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_subtotal - django.core.exceptions.ValidationError: {'total': ['This field cannot be null.']}\r\nFAILED payments_api/test_services.py::test_create_valid_payment - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_payment_data - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_street1 - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_street2 - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_city - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_county - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_country - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_postcode - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_card_number - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_expiry - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_ccv2 - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_short_card_number - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_long_card_number - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_non_date_expiry - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_non_numeric_ccv2 - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_update_payment_with_nonexistent_payment_id - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}\r\nFAILED payments_api/test_services.py::test_process_payment_failure - django.core.exceptions.ValidationError: {'total': ['Ensure that there are no more than 2 decimal places.']}","comments":[{"id":"IC_kwDOJVY7Ys5uSe8J","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to expect ValidationError instead of IntegrityError.\r\nUpdated tests to use revised payment services interface including passing subscription_option_id instead of total.\r\nAdded additional validation to the Payment model.\r\n","createdAt":"2023-12-11T15:44:04Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/74#issuecomment-1850339081","viewerDidAuthor":true},{"id":"IC_kwDOJVY7Ys5uTwRP","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to use refined interfaces for the payment services.\r\nUpdated confirmation tests to use test payment methods from Stripe.","createdAt":"2023-12-11T18:41:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/74#issuecomment-1850672207","viewerDidAuthor":true}],"number":74,"title":"Tests to create and update payments failing with ValidationError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/74"},{"body":"FAILED payments_api/test_services.py::test_create_payment_with_null_data - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_subscription_id - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_months - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_payment_with_negative_months - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_payment_with_null_subtotal - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_payment_with_negative_subtotal - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_payment_with_invalid_currency_code - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_create_valid_payment - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_payment_data - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_street1 - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_street2 - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_city - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_county - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_country - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_postcode - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_card_number - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_expiry - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_null_ccv2 - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_short_card_number - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_long_card_number - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_non_date_expiry - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_non_numeric_ccv2 - NameError: name 'subscription_id' is not defined\r\nFAILED payments_api/test_services.py::test_update_payment_with_nonexistent_payment_id - NameError: name 'subscription_id' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uRTjS","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Variable declared as 'susbcription_id' in tests code. Renamed the variable.","createdAt":"2023-12-11T12:57:29Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/73#issuecomment-1850030290","viewerDidAuthor":true}],"number":73,"title":"Payment services tests raising NameError 'subscription_id' not defined","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/73"},{"body":"FAILED forms_api/test_views.py::test_delete_form_with_non_existent_id - forms_api.models.Form.DoesNotExist: Form matching query does not exist.\r\nFAILED forms_api/test_views.py::test_delete_question_with_non_existent_id - forms_api.models.Form.DoesNotExist: Form matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uQjqr","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to return 404 if no object matching the provided IDs exists.","createdAt":"2023-12-11T11:00:01Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/72#issuecomment-1849834155","viewerDidAuthor":true}],"number":72,"title":"Deleting forms and questions with non-existent IDs returns a DoesNotExist error instead of a 404","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/72"},{"body":"FAILED forms_api/test_views.py::test_get_single_form - assert 400 == 200\r\nFAILED forms_api/test_views.py::test_get_multiple_forms - assert 400 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uQu6h","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was occurring because the tests were using the parameter name 'ids' on the querystring instead of 'jurisdiction_ids'.","createdAt":"2023-12-11T11:26:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/71#issuecomment-1849880225","viewerDidAuthor":true}],"number":71,"title":"Getting forms returns a 400 error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/71"},{"body":"FAILED forms_api/test_views.py::test_put_numeric_question - AttributeError: 'NumericQuestion' object has no attribute 'min_val'. Did you mean: 'min_value'?","comments":[{"id":"IC_kwDOJVY7Ys5uQh6g","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Tests were using the wrong attribute name (min_val instead of min_value) to access the min_value attribute.","createdAt":"2023-12-11T10:55:34Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/70#issuecomment-1849826976","viewerDidAuthor":true}],"number":70,"title":"Put numeric question tests failing with name error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/70"},{"body":"FAILED forms_api/test_views.py::test_put_numeric_question_with_null_data - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_text - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_ordinal - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_non_numeric_ordinal - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_explainer - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_is_mandatory - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined\r\nFAILED forms_api/test_views.py::test_put_numeric_question - NameError: name '_FormQuestionsDetail__post_numeric_question' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uQfnh","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The main put endpoint was calling the post_numeric_quesiton method which doesn't exist on the Detail view for questions.","createdAt":"2023-12-11T10:49:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/69#issuecomment-1849817569","viewerDidAuthor":true}],"number":69,"title":"Putting numeric questions returns a NameError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/69"},{"body":"FAILED forms_api/test_views.py::test_put_boolean_question_with_non_existent_id - NameError: name 'form_id' is not defined\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_non_existent_id - NameError: name 'form_id' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uQbjB","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was because form_id was not defined in the test. Added a line of code to create a mock form and store the id in form_id variable.","createdAt":"2023-12-11T10:44:59Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/68#issuecomment-1849800897","viewerDidAuthor":true}],"number":68,"title":"Putting boolean and multiple choice questions with non_existent_id returns NameError","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/68"},{"body":"FAILED forms_api/test_views.py::test_put_boolean_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” ...\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Hmmm” value must be an integer.']}\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” ...\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Hmmm” value must be an integer.']}\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}","comments":[{"id":"IC_kwDOJVY7Ys5uQZX8","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to API to ensure appropriate HTTP responses are returned.","createdAt":"2023-12-11T10:42:35Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/67#issuecomment-1849791996","viewerDidAuthor":true}],"number":67,"title":"Tests failing with ValidationErrors when PUTing questions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/67"},{"body":"FAILED forms_api/test_views.py::test_post_multiple_choice_question - forms_api.models.MultipleChoiceQuestion.DoesNotExist: MultipleChoiceQuestion matching query does not exist.\r\nFAILED forms_api/test_views.py::test_post_numeric_question - forms_api.models.NumericQuestion.DoesNotExist: NumericQuestion matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uQSwK","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"MultipleChoice and Numeric question tests were sending the wrong question type leading to the wrong type of question being created with the result that the question did not exist when the test rechecked. Updated the test code to send the right question type.","createdAt":"2023-12-11T10:28:52Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/66#issuecomment-1849764874","viewerDidAuthor":true}],"number":66,"title":"Valid POST question tests failing with Question.DoesNotExist errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/66"},{"body":"FAILED forms_api/test_views.py::test_post_boolean_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” ...\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_non_existent_form_id - forms_api.models.Form.DoesNotExist: Form matching query does not exist.\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Try again” value must be an integer.']}\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” ...\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_existent_form_id - forms_api.models.Form.DoesNotExist: Form matching query does not exist.\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Try again” value must be an integer.']}\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question - forms_api.models.MultipleChoiceQuestion.DoesNotExist: MultipleChoiceQuestion matching query does not exist.\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” ...\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_existent_form_id - forms_api.models.Form.DoesNotExist: Form matching query does not exist.\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Try again” value must be an integer.']}\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_views.py::test_post_numeric_question - forms_api.models.NumericQuestion.DoesNotExist: NumericQuestion matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uQNOe","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added error handling to ensure appropriate HTTP responses are returned.","createdAt":"2023-12-11T10:16:19Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/65#issuecomment-1849742238","viewerDidAuthor":true}],"number":65,"title":"POSTing questions with invalid data raises exceptions instead of returning HTTP error codes","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/65"},{"body":"FAILED forms_api/test_views.py::test_post_boolean_question_with_null_data - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_non_existent_form_id - assert 301 == 404\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_text - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_ordinal - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_non_numeric_ordinal - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_explainer - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_null_is_mandatory - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_boolean_question - assert 301 == 200\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_data - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_existent_form_id - assert 301 == 404\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_text - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_ordinal - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_numeric_ordinal - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_explainer - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_null_is_mandatory - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question - assert 301 == 200\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_data - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_existent_form_id - assert 301 == 404\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_text - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_ordinal - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_numeric_ordinal - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_explainer - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_null_is_mandatory - assert 301 == 400\r\nFAILED forms_api/test_views.py::test_post_numeric_question - assert 301 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uQJie","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The trailing / was missing from the URL used by the tests to POST questions","createdAt":"2023-12-11T10:07:05Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/64#issuecomment-1849727134","viewerDidAuthor":true}],"number":64,"title":"Tests failing when POSTing questions with 301 redirect","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/64"},{"body":"FAILED forms_api/test_views.py::test_post_boolean_question_with_non_existent_form_id - assert 400 == 404\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_existent_form_id - assert 400 == 404\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_existent_form_id - assert 400 == 404","comments":[{"id":"IC_kwDOJVY7Ys5uQH2q","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The tests were posting to the base URL for the forms API instead of the list API for questions.\r\nResolved by updating tests.\r\nAlso updated the tests for invalid form_ids to expect 404 instead of 400.","createdAt":"2023-12-11T10:03:04Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/63#issuecomment-1849720234","viewerDidAuthor":true}],"number":63,"title":"POSTing questions with non_existent form id returns 400 instead of 404","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/63"},{"body":"","comments":[{"id":"IC_kwDOJVY7Ys5uREz8","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Implemented API endpoints for multiple choice options.","createdAt":"2023-12-11T12:20:44Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/62#issuecomment-1849969916","viewerDidAuthor":true}],"number":62,"title":"API endpoints for multiple choice options not implemented","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/62"},{"body":"FAILED forms_api/test_views.py::test_put_boolean_question_with_null_data - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_text - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_ordinal - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_non_numeric_ordinal - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_explainer - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_null_is_mandatory - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_boolean_question - assert 405 == 200\r\nFAILED forms_api/test_views.py::test_put_boolean_question_with_non_existent_id - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_data - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_text - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_ordinal - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_non_numeric_ordinal - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_explainer - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_null_is_mandatory - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question - assert 405 == 200\r\nFAILED forms_api/test_views.py::test_put_multiple_choice_question_with_non_existent_id - assert 405 == 404\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_data - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_text - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_ordinal - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_non_numeric_ordinal - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_explainer - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_null_is_mandatory - assert 405 == 400\r\nFAILED forms_api/test_views.py::test_put_numeric_question - assert 405 == 200\r\nFAILED forms_api/test_views.py::test_put_numeric_question_with_non_existent_id - assert 405 == 404","comments":[{"id":"IC_kwDOJVY7Ys5uQUHs","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was a result of the tests sending PUT requests to the incorrect URL. Updated the URL in all PUT question tests.","createdAt":"2023-12-11T10:32:18Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/61#issuecomment-1849770476","viewerDidAuthor":true}],"number":61,"title":"PUTing questions returns unexpected 405 errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/61"},{"body":"FAILED forms_api/test_views.py::test_get_single_form - assert 400 == 200\r\nFAILED forms_api/test_views.py::test_get_multiple_forms - assert 400 == 200\r\nFAILED forms_api/test_views.py::test_post_boolean_question_with_non_existent_form_id - assert 400 == 404\r\nFAILED forms_api/test_views.py::test_post_boolean_question - assert 400 == 200\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question_with_non_existent_form_id - assert 400 == 404\r\nFAILED forms_api/test_views.py::test_post_multiple_choice_question - assert 400 == 200\r\nFAILED forms_api/test_views.py::test_post_numeric_question_with_non_existent_form_id - assert 400 == 404\r\nFAILED forms_api/test_views.py::test_post_numeric_question - assert 400 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uz2UH","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added additional error handling to the forms API endpoints to ensure the appropriate HTTP responses are returned.","createdAt":"2023-12-17T09:29:49Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/60#issuecomment-1859085575","viewerDidAuthor":true}],"number":60,"title":"POSTing and GETing questions returns unexpected 400 errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/60"},{"body":"FAILED forms_api/test_views.py::test_post_second_form_for_jurisdiction - django.core.exceptions.ValidationError: {'jurisdiction_id': ['Form with this Jurisdiction id already exists.']}\r\nFAILED forms_api/test_views.py::test_post_form_with_null_jurisdiction_id - django.core.exceptions.ValidationError: {'jurisdiction_id': ['This field cannot be null.']}\r\nFAILED forms_api/test_views.py::test_post_form_with_non_numeric_jurisdiction_id - django.core.exceptions.ValidationError: {'jurisdiction_id': ['“ABC” value must be an integer.']}","comments":[{"id":"IC_kwDOJVY7Ys5uPz0G","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved. Added additional error handling to POST form endpoint.","createdAt":"2023-12-11T09:25:06Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/59#issuecomment-1849638150","viewerDidAuthor":true}],"number":59,"title":"Form POST endpoint not correctly handling validation errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/59"},{"body":"FAILED forms_api/test_views.py::test_post_form - KeyError: 'id'","comments":[{"id":"IC_kwDOJVY7Ys5uPxgO","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The issue was that the test was accessing an 'id' attribute on the response from the API. The correct attribute name is 'form_id'. Updated the test to reflect the correct name.","createdAt":"2023-12-11T09:19:09Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/58#issuecomment-1849628686","viewerDidAuthor":true}],"number":58,"title":"KeyError 'id' when posting form with valid data","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/58"},{"body":"FAILED forms_api/test_services.py::test_create_option_with_null_text - TypeError: create_multiple_choice_option() missing 2 required positional arguments: 'text' and 'explainer'\r\nFAILED forms_api/test_services.py::test_create_option - TypeError: create_multiple_choice_option() missing 2 required positional arguments: 'text' and 'explainer'\r\nFAILED forms_api/test_services.py::test_delete_option - TypeError: create_multiple_choice_option() missing 2 required positional arguments: 'text' and 'explainer'","comments":[{"id":"IC_kwDOJVY7Ys5uNcVq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to provide all required parameters.","createdAt":"2023-12-10T16:48:55Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/57#issuecomment-1849017706","viewerDidAuthor":true}],"number":57,"title":"Incorrect number of parameters provided to create_multiple_choice_option service by tests","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/57"},{"body":"FAILED forms_api/test_services.py::test_create_boolean_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” value must be eith...\r\nFAILED forms_api/test_services.py::test_create_boolean_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_boolean_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_boolean_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Try again” value must be an integer.']}\r\nFAILED forms_api/test_services.py::test_create_boolean_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_boolean_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” value must be eith...\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Hmmm” value must be an integer.']}\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” value must be eith...\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Try again” value must be an integer.']}\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” value must be eith...\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Hmmm” value must be an integer.']}\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” value must be eith...\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Try again” value must be an integer.']}\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_data - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.'], 'ordinal': ['This field cannot be null.'], 'explainer': ['This field cannot be null.'], 'is_mandatory': ['“None” value must be eith...\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_text - django.core.exceptions.ValidationError: {'text': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_numeric_ordinal - django.core.exceptions.ValidationError: {'ordinal': ['“Hmmm” value must be an integer.']}\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_explainer - django.core.exceptions.ValidationError: {'explainer': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_is_mandatory - django.core.exceptions.ValidationError: {'is_mandatory': ['“None” value must be either True or False.']}","comments":[{"id":"IC_kwDOJVY7Ys5uNbhl","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to expect ValidationError only exist where a valid, non-existent foreign key is provided.","createdAt":"2023-12-10T16:35:25Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/56#issuecomment-1849014373","viewerDidAuthor":true}],"number":56,"title":"Create and update question tests failing after changing service methods to call full_clean on models before saving","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/56"},{"body":"FAILED forms_api/test_services.py::test_create_numeric_question_with_null_data - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_text - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_ordinal - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_non_numeric_ordinal - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_explainer - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_is_mandatory - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_create_numeric_question - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_data - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_text - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_ordinal - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_numeric_ordinal - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_explainer - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_is_mandatory - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question - NameError: name 'NumericAnswerValidationRule' is not defined\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_existent_id - NameError: name 'NumericAnswerValidationRule' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uNa8f","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"NumericAnswerValidationRule was removed from the model as unnecessary normalisation. Added the attributes directly to NumericQuestion model instead. Updated the service accordingly.","createdAt":"2023-12-10T16:27:05Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/55#issuecomment-1849011999","viewerDidAuthor":true}],"number":55,"title":"Tests to create or update numeric questions are throwing: 'NumericAnswerValidationRule' is not defined","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/55"},{"body":"FAILED forms_api/test_services.py::test_create_numeric_question_with_null_data - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_text - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_non_numeric_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_explainer - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_is_mandatory - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_data - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_text - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_numeric_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_explainer - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_is_mandatory - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_existent_id - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uNaV_","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The create_numeric_question which is tested by both create and update tests for numeric questions included a print statement to output the string value of the form. In the tests, forms are being created with non-existent jurisdictions for test purposes. Resolved these defects by removing the print statement","createdAt":"2023-12-10T16:18:56Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/54#issuecomment-1849009535","viewerDidAuthor":true}],"number":54,"title":"Creating or updating numeric questions throws Jurisdiction.DoesNotExist errors","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/54"},{"body":"FAILED forms_api/test_services.py::test_create_boolean_question_with_non_numeric_form_id - django.core.exceptions.ValidationError: ['The form_id must be a valid integer when creating a question']\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_null_form_id - django.core.exceptions.ValidationError: ['The form_id must be a valid integer when creating a question']\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question_with_non_numeric_form_id - django.core.exceptions.ValidationError: ['The form_id must be a valid integer when creating a question']\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_data - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_form_id - django.core.exceptions.ValidationError: ['The form_id must be a valid integer when creating a question']\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_non_numeric_form_id - django.core.exceptions.ValidationError: ['The form_id must be a valid integer when creating a question']\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_text - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_non_numeric_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_explainer - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question_with_null_is_mandatory - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_create_numeric_question - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_data - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_text - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_numeric_ordinal - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_explainer - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_null_is_mandatory - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_existent_id - jurisdictions_api.models.Jurisdiction.DoesNotExist: Jurisdiction matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uNZ0z","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Update services and test_services to use a consistent set of errors as follows:\r\n\r\n- IntegrityErrors when a null constraint is violated\r\n- DoesNotExist errors where a non-existent but otherwise valid foreign key is provided\r\n- ValueErrors for non-numeric values specified against numeric attributes\r\n- ValidationErrors for everything else","createdAt":"2023-12-10T16:11:24Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/53#issuecomment-1849007411","viewerDidAuthor":true}],"number":53,"title":"Form API services not correctly handling null or invalid data when creating or updating questions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/53"},{"body":"FAILED forms_api/test_services.py::test_update_boolean_question_with_null_text - AttributeError: 'BooleanQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_ordinal - AttributeError: 'BooleanQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_non_numeric_ordinal - AttributeError: 'BooleanQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_explainer - AttributeError: 'BooleanQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_null_is_mandatory - AttributeError: 'BooleanQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_boolean_question - AttributeError: 'BooleanQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_data - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_text - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_ordinal - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_non_numeric_ordinal - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_explainer - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_is_mandatory - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question - AttributeError: 'MultipleChoiceQuestion' object has no attribute 'update'","comments":[{"id":"IC_kwDOJVY7Ys5uNYYO","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Replace .update() with assignment to attributes followed by .save()","createdAt":"2023-12-10T15:50:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/52#issuecomment-1849001486","viewerDidAuthor":true}],"number":52,"title":"Updating Boolean or MultipleChoice Questions throws attribute error - 'no attribute 'update''","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/52"},{"body":"FAILED forms_api/test_services.py::test_create_form_with_null_jurisdiction_id - django.core.exceptions.ValidationError: {'jurisdiction_id': ['This field cannot be null.']}\r\nFAILED forms_api/test_services.py::test_create_form_with_non_numeric_jurisdiction_id - django.core.exceptions.ValidationError: {'jurisdiction_id': ['“ABC” value must be an integer.']}","comments":[{"id":"IC_kwDOJVY7Ys5uNWpd","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved this by updating the affected tests to expect a ValidationError in the test code.","createdAt":"2023-12-10T15:20:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/51#issuecomment-1848994397","viewerDidAuthor":true}],"number":51,"title":"Forms API services tests failing when creating forms with non-numeric jurisdiction_ids","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/51"},{"body":"FAILED subscriptions_api/test_views.py::test_get_status_where_subscription_expired - KeyError: 'status'\r\nFAILED subscriptions_api/test_views.py::test_get_status_where_subscription_active - KeyError: 'status'","comments":[{"id":"IC_kwDOJVY7Ys5uNHTQ","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The test code was looking for a response attribute \"status\" instead of the actual response attribute \"has_active_subscription\". Updated test code to match the actual response.","createdAt":"2023-12-10T11:04:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/50#issuecomment-1848931536","viewerDidAuthor":true}],"number":50,"title":"KeyError 'status' when checking status of subscription in view_tests.py","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/50"},{"body":"FAILED subscriptions_api/test_views.py::test_patch_subscription - KeyError: 'id'","comments":[{"id":"IC_kwDOJVY7Ys5uNGpv","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"No data included in response","createdAt":"2023-12-10T10:54:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/49#issuecomment-1848928879","viewerDidAuthor":true},{"id":"IC_kwDOJVY7Ys5uNGwz","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"No data included in the response as the subscription_id is never returned from the services by design. This is because the subscription is always accessed via the user_id.\r\n\r\nUpdated the test code to reflect this.","createdAt":"2023-12-10T10:56:08Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/49#issuecomment-1848929331","viewerDidAuthor":true}],"number":49,"title":"KeyError 'id' when patching subscription","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/49"},{"body":"FAILED subscriptions_api/test_views.py::test_patch_subscription_with_null_subscription_option_id - subscriptions_api.models.SubscriptionOption.DoesNotExist: SubscriptionOption matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uNG6O","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was due to missing validation in the services and API layer. Added validation to check that the user id is valid before accessing the subscription option. Added error handling for both errors to the view method.","createdAt":"2023-12-10T10:58:39Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/48#issuecomment-1848929934","viewerDidAuthor":true}],"number":48,"title":"DoesNotExist error not correctly handled when PATCHING subscription","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/48"},{"body":"FAILED subscriptions_api/test_views.py::test_patch_subscription - assert 400 == 200\r\n\r\nWith error:\r\n\r\n{'error': 'Invalid request. Please supply the users id.'}","comments":[{"id":"IC_kwDOJVY7Ys5uNGZe","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"API was expecting the user_id in the query parameters, whereas the test expected this to be passed in the body. Updated the API to validate requests in line with the test.","createdAt":"2023-12-10T10:50:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/47#issuecomment-1848927838","viewerDidAuthor":true}],"number":47,"title":"Valid PATCH subscription test is returning 400 error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/47"},{"body":"FAILED subscriptions_api/test_views.py::test_get_status_where_multiple_subscriptions_exists - assert 9 == 3","comments":[{"id":"IC_kwDOJVY7Ys5uNC1n","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The subscription option was being created in the test with a different number of months to the expected. Fixed in the test code.","createdAt":"2023-12-10T09:50:20Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/46#issuecomment-1848913255","viewerDidAuthor":true}],"number":46,"title":"Subscription months returned does not meet expected months","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/46"},{"body":"FAILED subscriptions_api/test_views.py::test_patch_subscription_with_null_subscription_option_id - assert 404 == 400\r\nFAILED subscriptions_api/test_views.py::test_patch_subscription - assert 404 == 200\r\nFAILED subscriptions_api/test_views.py::test_get_status_where_subscription_expired - assert 404 == 200\r\nFAILED subscriptions_api/test_views.py::test_get_status_where_subscription_active - assert 404 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uNF7y","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Update methods use the user_id to update subscriptions so no subscription_id should be passed in the url. Updated tests to reflect this.","createdAt":"2023-12-10T10:42:33Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/45#issuecomment-1848925938","viewerDidAuthor":true},{"id":"IC_kwDOJVY7Ys5uNHHy","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Checking status - the test code was adding an extra / to the url","createdAt":"2023-12-10T11:01:44Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/45#issuecomment-1848930802","viewerDidAuthor":true}],"number":45,"title":"404 returned when attempting to access subscription API in views tests","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/45"},{"body":"FAILED subscriptions_api/test_views.py::test_post_valid_subscription - KeyError: 'id'","comments":[{"id":"IC_kwDOJVY7Ys5uNFAR","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The API was returning subscription_id instead of id in the response. Updated the test to match the API.","createdAt":"2023-12-10T10:26:03Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/44#issuecomment-1848922129","viewerDidAuthor":true}],"number":44,"title":"KeyError 'id' when running test_post_valid_subscription","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/44"},{"body":"FAILED subscriptions_api/test_views.py::test_post_subscription_with_null_data - subscriptions_api.models.SubscriptionOption.DoesNotExist: SubscriptionOption matching query does not exist.\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_null_user_id - django.db.utils.IntegrityError: NOT NULL constraint failed: subscriptions_api_subscription.user_id\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_null_subscription_option_id - subscriptions_api.models.SubscriptionOption.DoesNotExist: SubscriptionOption matching query does not exist.","comments":[{"id":"IC_kwDOJVY7Ys5uNEyW","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Add exception handling to views method when creating new subscription to catch validation, integrity, and doesnotexist errors and return the appropriate HTTP status code.","createdAt":"2023-12-10T10:22:11Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/43#issuecomment-1848921238","viewerDidAuthor":true}],"number":43,"title":"Errors not properly handled when posting subscription with null data","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/43"},{"body":"Steps to reproduce:\r\n- Create a subscription\r\n- Set the date on the subscription to a past date such that the subscription expires\r\n- Call the check subscription status service on the subscription\r\n\r\nExpected result:\r\n- Returns False\r\n\r\nActual result:\r\n- Throws an AttributeError","comments":[{"id":"IC_kwDOJVY7Ys5uND2u","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"The is_active method on a subscription was attempting to use the date() function on a date object. Changed the method of converting datetimes into dates.","createdAt":"2023-12-10T10:06:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/42#issuecomment-1848917422","viewerDidAuthor":true}],"number":42,"title":"Getting the status of an expired subscription returns an attributeerror","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/42"},{"body":"When multiple subscriptions are found for a single user, the check subscription status service should return an IntegrityError instead of a generic Exception.","comments":[{"id":"IC_kwDOJVY7Ys5uNEfn","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Replaced generic Exception with IntegrityError.","createdAt":"2023-12-10T10:17:02Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/41#issuecomment-1848920039","viewerDidAuthor":true}],"number":41,"title":"Check subscription status service returns a generic Exception where more than one subscription found","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/41"},{"body":"Steps to reproduce:\r\n- Invoke the create subscription service with both a null user_id and a null subscription_option_id.\r\n\r\nExpected result:\r\n- A validationerror is returned.\r\n\r\nActual result:\r\n- A SubscriptionOption.DoesNotExist error is returned.","comments":[{"id":"IC_kwDOJVY7Ys5uNETs","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added validation to check that a valid user id has been provided before attempting to get the subscription option.","createdAt":"2023-12-10T10:13:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/40#issuecomment-1848919276","viewerDidAuthor":true}],"number":40,"title":"Create subscription service returns unexpected error when null data provided","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/40"},{"body":"Tests for the subscription API are passing the number of months to create and update services instead of the subscription option ID.","comments":[{"id":"IC_kwDOJVY7Ys5uNCoP","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated tests to post subscription_option_id","createdAt":"2023-12-10T09:46:37Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/39#issuecomment-1848912399","viewerDidAuthor":true}],"number":39,"title":"Subscription API tests are passing number of months instead of option ID to services","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/39"},{"body":"FAILED subscriptions_api/test_views.py::test_post_subscription_with_nonexistent_user_id - assert 400 == 200\r\nFAILED subscriptions_api/test_views.py::test_post_valid_subscription - assert 400 == 200","comments":[{"id":"IC_kwDOJVY7Ys5uNFHy","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved as a result of other changes to the services.","createdAt":"2023-12-10T10:28:12Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/38#issuecomment-1848922610","viewerDidAuthor":true}],"number":38,"title":"Posting valid subscriptions to subscription API returns 400 error","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/38"},{"body":"Following on from a change in how calculation results are held within the rules API, rules API tests are failing","comments":[{"id":"IC_kwDOJVY7Ys5uufrd","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated all tests to use the new TaxCalculationResult data structure.","createdAt":"2023-12-15T10:55:17Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/37#issuecomment-1857682141","viewerDidAuthor":true}],"number":37,"title":"Rules API tests are failing due to change in results data structure format","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/37"},{"body":"The flow when entering addresses on the checkout page does not match expectations:\r\n\r\n![image](https://github.com/Laura10101/contractor-tax-calculator/assets/94467021/3f8a93cd-0b44-4b1a-9a01-93a6de30ae0a)\r\n\r\nThis should either following an address lookup process or the following field order:\r\n\r\n1. Address line 1\r\n2. Address line 2\r\n3. City\r\n4. County\r\n5. Country\r\n6. Postcode","comments":[{"id":"IC_kwDOJVY7Ys5yET2P","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the checkout page to use the Stripe address elements","createdAt":"2024-01-28T21:48:59Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/36#issuecomment-1913732495","viewerDidAuthor":true}],"number":36,"title":"Address entry flow on checkout page is not intuitive","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/36"},{"body":"The checkout page is incorrectly formatted.\r\n![image](https://github.com/Laura10101/contractor-tax-calculator/assets/94467021/13b46550-5e86-4878-af9f-6d0a1ec55a1e)\r\n","comments":[{"id":"IC_kwDOJVY7Ys5yETyf","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated layout and formatting of checkout page, including using Stripe elements for address entry as well as card input.","createdAt":"2024-01-28T21:47:53Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/35#issuecomment-1913732255","viewerDidAuthor":true}],"number":35,"title":"The checkout page is not correctly formatted","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/35"},{"body":"The purchase button on the pricing page is not correctly formatted and reads \"Submit\" rather than \"Purchase\"","comments":[{"id":"IC_kwDOJVY7Ys5yLRx-","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Updated the formatting on the subscription options page to style and centre this appropriately.","createdAt":"2024-01-29T21:01:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/34#issuecomment-1915559038","viewerDidAuthor":true}],"number":34,"title":"Purchase button on pricing page not correctly formatted","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/34"},{"body":"**Steps to reproduce**\r\nOn the user app:\r\n1. Log out of user account if logged in\r\n2. Select \"Create Tax Calculation\"\r\n\r\nExpected result:\r\nUser will be directed to the pricing page\r\n\r\nActual result:\r\nUser will be redirected to the login page","comments":[{"id":"IC_kwDOJVY7Ys5yD7Pm","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was resolved by adding the @login_required decorator to the calculation views. As a result, the user will be redirected to the login page before the view is called and so the redirect to the pricing page only occurs if the user is already logged in.","createdAt":"2024-01-28T15:21:09Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/33#issuecomment-1913631718","viewerDidAuthor":true}],"number":33,"title":"Calculation page redirects to pricing page if not logged in.","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/33"},{"body":"Create and delete services for multiple choice options have not yet been defined.\r\n\r\n**Test Command**\r\npytest forms_api/test_services.py\r\n\r\n**Test Details**\r\nFAILED forms_api/test_services.py::test_create_option_with_null_text - NameError: name 'create_multiple_choice_option' is not defined\r\nFAILED forms_api/test_services.py::test_create_option - NameError: name 'create_multiple_choice_option' is not defined\r\nFAILED forms_api/test_services.py::test_delete_option - NameError: name 'create_multiple_choice_option' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uNb1S","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Implemented the create and delete services for multiple choice options","createdAt":"2023-12-10T16:40:07Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/32#issuecomment-1849015634","viewerDidAuthor":true}],"number":32,"title":"Services to handle multiple choice options are not yet defined","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/32"},{"body":"When updating numeric questions the filter() rather than the get() method is used to retrieve the existing object from the database. A queryset is returned rather than the model object resulting in the following errors during testing.\r\n\r\n**Test Command**\r\npytest forms_api/test_services.py\r\n\r\n**Test Details**\r\nFAILED forms_api/test_services.py::test_update_numeric_question - AttributeError: 'PolymorphicQuerySet' object has no attribute 'validation_rule'\r\nFAILED forms_api/test_services.py::test_update_numeric_question_with_non_existent_id - AttributeError: 'PolymorphicQuerySet' object has no attribute 'validation_rule'","comments":[{"id":"IC_kwDOJVY7Ys5uNXtR","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Replaced filter with get","createdAt":"2023-12-10T15:38:27Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/31#issuecomment-1848998737","viewerDidAuthor":true}],"number":31,"title":"Filter() rather than get() to retrieve models when updating numeric questions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/31"},{"body":"When creating or updating MultipleChoiceQuestion models in the forms services, the is_multiselect field is not populated and the services do not expect a value for this.\r\n\r\n**Test Command**\r\npytest forms_api/test_services.py \r\n\r\n**Test Details**\r\nFAILED forms_api/test_services.py::test_create_multiple_choice_question - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_data - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_text - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_ordinal - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_non_numeric_ordinal - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_explainer - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_null_is_mandatory - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_non_existent_id - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect","comments":[{"id":"IC_kwDOJVY7Ys5uNX7U","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added is_multiselect parameter to the service and used this to create/update multi-choice questions.","createdAt":"2023-12-10T15:42:19Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/30#issuecomment-1848999636","viewerDidAuthor":true}],"number":30,"title":"Multiple choice services in the forms API do not populate the is_multiselect attribute on MultipleChoiceQuestions","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/30"},{"body":"When passing non-existent IDs to delete or update services in the forms API, the expected ObjectDoesNotExist error is not thrown.\r\n\r\n**Test Command**\r\npytest forms_api/test_services.py\r\n\r\n**Test Details**\r\nFAILED forms_api/test_services.py::test_get_forms_with_empty_jurisdiction_ids_list - Failed: DID NOT RAISE <class 'Exception'>\r\nFAILED forms_api/test_services.py::test_delete_form_with_non_existent_id - Failed: DID NOT RAISE <class 'django.core.exceptions.ObjectDoesNotExist'>\r\nFAILED forms_api/test_services.py::test_update_boolean_question_with_non_existent_id - Failed: DID NOT RAISE <class 'django.core.exceptions.ObjectDoesNotExist'>\r\nFAILED forms_api/test_services.py::test_update_multiple_choice_question_with_non_existent_id - django.db.utils.IntegrityError: NOT NULL constraint failed: forms_api_multiplechoicequestion.is_multiselect\r\nFAILED forms_api/test_services.py::test_delete_question_with_non_existent_id - Failed: DID NOT RAISE <class 'django.core.exceptions.ObjectDoesNotExist'>","comments":[{"id":"IC_kwDOJVY7Ys5uNXnl","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Replaced .filter(pk__exact=id) with .get(pk=id) to force ObjectDoesNotExist errors.","createdAt":"2023-12-10T15:36:58Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/29#issuecomment-1848998373","viewerDidAuthor":true}],"number":29,"title":"Forms services do not correctly handle deletion or updating on non-existent IDs","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/29"},{"body":"No error is thrown when passing the get_forms_by_jurisdiction_ids service an empty list of IDs\r\n\r\n**Test Command**\r\n pytest forms_api/test_services.py\r\n\r\n**Test Details**\r\nFAILED forms_api/test_services.py::test_get_forms_with_empty_jurisdiction_ids_list - Failed: DID NOT RAISE <class 'Exception'>","comments":[{"id":"IC_kwDOJVY7Ys5uNXOV","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Added validation to check that the list of jurisdiction IDs provided is a non-empty list and contains only integers.","createdAt":"2023-12-10T15:29:55Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/28#issuecomment-1848996757","viewerDidAuthor":true}],"number":28,"title":"Get forms by jurisdiction service does not correct validate jurisdiction IDs","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/28"},{"body":"The Form API is missing validation to prevent multiple forms being created for a single jurisdiction\r\n\r\n**Test Command**\r\npytest forms_api/test_services.py \r\n\r\n**Test Details**\r\nFAILED forms_api/test_services.py::test_create_second_form_for_jurisdiction - Failed: DID NOT RAISE <class 'django.db.utils.IntegrityError'>","comments":[{"id":"IC_kwDOJVY7Ys5uNWdq","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"There was no validation on forms to enforce the uniqueness of the jurisdiction_id. Resolved this by adding a unique constraint and running a full_clean in the services layer.","createdAt":"2023-12-10T15:17:42Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/27#issuecomment-1848993642","viewerDidAuthor":true}],"number":27,"title":"Form API allows creation of multiple forms for a single jurisdiction","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/27"},{"body":"When testing the subscription API, multiple endpoints and tests incorrectly return a 404 where a 200 or 400 response are expected\r\n\r\n**Test Command**\r\npytest subscriptions_api/test_views.py\r\n\r\n**Test Details**\r\nFAILED subscriptions_api/test_views.py::test_patch_subscription_with_null_months - assert 404 == 400\r\nFAILED subscriptions_api/test_views.py::test_patch_subscription_with_negative_months - assert 404 == 400\r\nFAILED subscriptions_api/test_views.py::test_patch_subscription - assert 404 == 200\r\nFAILED subscriptions_api/test_views.py::test_get_status_where_multiple_subscriptions_exists - assert 404 == 409\r\nFAILED subscriptions_api/test_views.py::test_get_status_where_subscription_expired - assert 404 == 200\r\nFAILED subscriptions_api/test_views.py::test_get_status_where_subscription_active - assert 404 == 200","comments":[],"number":26,"title":"Subscription API incorrectly returns 404","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/26"},{"body":"When POSTing to the Subscriptions API, the subscription_months variable is used before it is defined\r\n\r\n**Test Command**\r\npytest subscriptions_api/test_views.py \r\n\r\n**Test Details**\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_null_data - NameError: name 'subscription_months' is not defined\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_null_user_id - NameError: name 'subscription_months' is not defined\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_nonexistent_user_id - NameError: name 'subscription_months' is not defined\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_null_months - NameError: name 'subscription_months' is not defined\r\nFAILED subscriptions_api/test_views.py::test_post_subscription_with_negative_months - NameError: name 'subscription_months' is not defined\r\nFAILED subscriptions_api/test_views.py::test_post_valid_subscription - NameError: name 'subscription_months' is not defined","comments":[{"id":"IC_kwDOJVY7Ys5uNFbx","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Resolved by ","createdAt":"2023-12-10T10:33:29Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/25#issuecomment-1848923889","viewerDidAuthor":true}],"number":25,"title":"subscription_months variable not defined in POST /subscriptions view","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/25"},{"body":"When checking whether a given user's subscription is active, the Get Subscription Status service attempts to compare a date object to a date time object, throwing an error.\r\n\r\n**Test Command**\r\npytest subscriptions_api/test_services.py \r\n\r\n**Test Details**\r\nFAILED subscriptions_api/test_services.py::test_get_status_where_subscription_active - TypeError: can't compare datetime.datetime to datetime.date","comments":[{"id":"IC_kwDOJVY7Ys5uNVhg","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Duplicate of: https://github.com/Laura10101/contractor-tax-calculator/issues/42","createdAt":"2023-12-10T15:03:11Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/24#issuecomment-1848989792","viewerDidAuthor":true}],"number":24,"title":"Get Subscription Status service attempting to compare date to datetime","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/24"},{"body":"When testing the Update Subscription service, the following error is displayed\r\n\r\n**Test Command**\r\npytest subscriptions_api/test_services.py \r\n\r\n**Test Details**\r\nFAILED subscriptions_api/test_services.py::test_update_subscription_with_null_months - AttributeError: 'Subscription' object has no attribute 'update'\r\nFAILED subscriptions_api/test_services.py::test_update_subscription_with_negative_months - AttributeError: 'Subscription' object has no attribute 'update'\r\nFAILED subscriptions_api/test_services.py::test_valid_subscription_update - AttributeError: 'Subscription' object has no attribute 'update'","comments":[],"number":23,"title":"'AttributeError' when updating subscription","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/23"},{"body":"The Create Subscription service does not prevent users from creating a subscription with negative subscription months value\r\n\r\n**Test Command**\r\npytest subscriptions_api/test_services.py\r\n\r\n**Test Details**\r\nFAILED subscriptions_api/test_services.py::test_create_subscription_with_negative_months - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uNV5X","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Superseded as the subscription API no longer asks for the number of months but instead asks users to select a subscription option.","createdAt":"2023-12-10T15:08:23Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/22#issuecomment-1848991319","viewerDidAuthor":true}],"number":22,"title":"Create subscription service not correctly validating subscription months","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/22"},{"body":"The Jurisdiction API incorrectly returns an OrderedDict instead of a JSON object when multiple jurisdictions are found\r\n\r\n**Test Command**\r\npytest jurisdictions_api/test_views.py\r\n\r\n**Test Details**\r\nFAILED jurisdictions_api/test_views.py::test_get_list_with_multiple_jurisdictions - AttributeError: 'collections.OrderedDict' object has no attribute 'name'","comments":[{"id":"IC_kwDOJVY7Ys5uLS99","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"In this case, the test code was incorrect. Changed the test code to use the dictionary key to access the name attribute on the jurisdiction instead of dot notation.","createdAt":"2023-12-09T16:25:11Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/21#issuecomment-1848455037","viewerDidAuthor":true}],"number":21,"title":"Jurisdiction API returns an OrderedDict instead of a JSON object when multiple jurisdictions found","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/21"},{"body":"The jurisdiction API is not correctly validating duplicate jurisdictions or jurisdiction names\r\n\r\n**Test Command**\r\npytest jurisdictions_api/test_views.py\r\n\r\n**Test Details**\r\nFAILED jurisdictions_api/test_views.py::test_post_jurisdiction_with_integer_name - assert 200 == 400\r\nFAILED jurisdictions_api/test_views.py::test_post_jurisdiction_with_short_name - assert 200 == 400\r\nFAILED jurisdictions_api/test_views.py::test_post_duplicate_jurisdiction - assert 200 == 400","comments":[{"id":"IC_kwDOJVY7Ys5uLSsj","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"This was the result of the services and models failing to validate the length, uniqueness and type of the jurisdiction name.","createdAt":"2023-12-09T16:22:10Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/20#issuecomment-1848453923","viewerDidAuthor":true}],"number":20,"title":"Jurisdiction API returning status code of 200 when invalid request made","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/20"},{"body":"Invalid jurisdiction names are being accepted rather than failing when testing the Create Jurisdiction service.\r\n\r\n**Test Command**\r\npytest jurisdictions_api/test_services.py\r\n\r\n**Test Details**\r\nFAILED jurisdictions_api/test_services.py::test_create_jurisdiction_with_integer_name - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED jurisdictions_api/test_services.py::test_create_jurisdiction_with_short_name - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED jurisdictions_api/test_services.py::test_create_jurisdiction_with_long_name - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>\r\nFAILED jurisdictions_api/test_services.py::test_create_duplicate_jurisdiction - Failed: DID NOT RAISE <class 'django.core.exceptions.ValidationError'>","comments":[{"id":"IC_kwDOJVY7Ys5uLR3u","author":{"login":"Laura10101"},"authorAssociation":"OWNER","body":"Solution here was to add validators to the model and in the services, call full_clean() and save() when creating a new jurisdiction instance instead of create().","createdAt":"2023-12-09T16:09:42Z","includesCreatedEdit":false,"isMinimized":false,"minimizedReason":"","reactionGroups":[],"url":"https://github.com/Laura10101/contractor-tax-calculator/issues/19#issuecomment-1848450542","viewerDidAuthor":true}],"number":19,"title":"Missing validation for jurisdiction name in 'Create Jurisdiction' service","url":"https://github.com/Laura10101/contractor-tax-calculator/issues/19"}]