Fix flakey test.

This would fail occasionally if these steps took longer than a second to
complete.
Merge pull request #274 from alphagov/fix_flakey_test

Fix flakey test.