def test_confirm_node_as_ham(self): view = NodeConfirmHamView() view = setup_log_view(view, self.request, guid=self.node._id) view.post(self.request) self.node.refresh_from_db() nt.assert_true(self.node.spam_status == 4)
def test_confirm_registration_as_ham(self): view = NodeConfirmHamView() view = setup_log_view(view, self.request, guid=self.registration._id) resp = view.post(self.request) nt.assert_true(resp.status_code == 302) self.registration.refresh_from_db() nt.assert_false(self.registration.is_public) nt.assert_true(self.registration.spam_status == 4)