Skip to content

Commit

Permalink
Fix a wrong test parameter in the flag formatter (#4552)
Browse files Browse the repository at this point in the history
We started using a service to determine whether an annotation had been
flagged, but this test wasn't updated and was still passing in the
database session. The test still worked, because we don't bother asking
the service anything when there is no user.
  • Loading branch information
David Thompson authored May 6, 2017
1 parent 8b5f1c2 commit c480243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/h/formatters/annotation_flag_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def test_format_for_missing_flag(self, formatter, factories):

assert formatter.format(annotation_resource) == {'flagged': False}

def test_format_for_unauthenticated_user(self, db_session, factories):
def test_format_for_unauthenticated_user(self, flag_service, factories):
annotation = factories.Annotation()
annotation_resource = FakeAnnotationResource(annotation)
formatter = AnnotationFlagFormatter(db_session,
formatter = AnnotationFlagFormatter(flag_service,
user=None)

assert formatter.format(annotation_resource) == {'flagged': False}
Expand Down

0 comments on commit c480243

Please sign in to comment.