Beispiel #1
0
    def test_unflag_sets_nipsa_false(self, db_session, users):
        svc = NipsaService(db_session)

        svc.unflag(users["renata"])

        assert not svc.is_flagged("acct:[email protected]")
        assert users["renata"].nipsa is False
Beispiel #2
0
    def test_unflag_sets_nipsa_false(self, db_session, users):
        svc = NipsaService(db_session)

        svc.unflag(users["renata"])

        assert not svc.is_flagged("acct:[email protected]")
        assert users["renata"].nipsa is False
Beispiel #3
0
    def test_unflag_triggers_reindex_job(self, db_session, users,
                                         reindex_user_annotations):
        svc = NipsaService(db_session)

        svc.unflag(users["renata"])

        reindex_user_annotations.delay.assert_called_once_with(
            "acct:[email protected]")
Beispiel #4
0
    def test_unflag_updates_cache(self, db_session, users):
        svc = NipsaService(db_session)

        svc.fetch_all_flagged_userids()
        svc.unflag(users["renata"])
        users["renata"].nipsa = True  # Make sure result below comes from cache.

        assert not svc.is_flagged(users["renata"].userid)
Beispiel #5
0
    def test_unflag_updates_cache(self, db_session, users):
        svc = NipsaService(db_session)

        svc.fetch_all_flagged_userids()
        svc.unflag(users["renata"])
        users[
            "renata"].nipsa = True  # Make sure result below comes from cache.

        assert not svc.is_flagged(users["renata"].userid)
Beispiel #6
0
    def test_unflag_triggers_reindex_job(
        self, db_session, users, reindex_user_annotations
    ):
        svc = NipsaService(db_session)

        svc.unflag(users["renata"])

        reindex_user_annotations.delay.assert_called_once_with(
            "acct:[email protected]"
        )
Beispiel #7
0
    def test_unflag_triggers_remove_nipsa_job(self, db_session, users, remove_nipsa):
        svc = NipsaService(db_session)

        svc.unflag(users["renata"])

        remove_nipsa.delay.assert_called_once_with("acct:[email protected]")
Beispiel #8
0
    def test_unflag_sets_nipsa_false(self, db_session, users):
        svc = NipsaService(db_session)

        svc.unflag(users["renata"])

        assert users["renata"].nipsa is False
Beispiel #9
0
    def test_unflag_sets_nipsa_false(self, db_session, users):
        svc = NipsaService(db_session)

        svc.unflag(users['renata'])

        assert users['renata'].nipsa is False