cloud-gov / pages-build-container

A container image that builds each site as part of the Pages platform
Other
15 stars 16 forks source link

Remove unnecessary mocks #379

Open drewbo opened 1 year ago

drewbo commented 1 year ago

Some portion of the code base is only tested via mocks where it could be tested more thoroughly. A good example of an area for improvement is publish testing. Both the s3 connection and the publisher itself are mocked where only one is needed (for instance, you can replace this code block with yield None and the test will still pass). Since we are using moto to mock AWS calls, we should unmock the calls to AWS and see if the mocked services have the files/properties we expect.

Acceptance Criteria

drewbo commented 1 year ago

Update: there is a separate test for s3publisher so maybe a better description would be to remove the s3 mocks where they aren't used