cloud-gov / pages-build-container

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

Remove unnecessary mocks #379

Open drewbo opened 2 years ago

drewbo commented 2 years 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 2 years 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