{% trans "Send direct message" %}
diff --git a/bookwyrm/templates/moderation/report_modal.html b/bookwyrm/templates/moderation/report_modal.html
index ce8408ee1..0d6504ab3 100644
--- a/bookwyrm/templates/moderation/report_modal.html
+++ b/bookwyrm/templates/moderation/report_modal.html
@@ -15,7 +15,9 @@
{% csrf_token %}
+{% if status %}
+{% endif %}
{% blocktrans with site_name=site.name %}This report will be sent to {{ site_name }}'s moderators for review.{% endblocktrans %}
diff --git a/bookwyrm/templates/snippets/user_options.html b/bookwyrm/templates/snippets/user_options.html
index 585417c71..ec772e54b 100644
--- a/bookwyrm/templates/snippets/user_options.html
+++ b/bookwyrm/templates/snippets/user_options.html
@@ -13,7 +13,7 @@
{% trans "Send direct message" %}
- {% include 'snippets/report_button.html' with user=status.user class="is-fullwidth" %}
+ {% include 'snippets/report_button.html' with user=user class="is-fullwidth" %}
{% include 'snippets/block_button.html' with user=user class="is-fullwidth" %}
diff --git a/bookwyrm/tests/management/__init__.py b/bookwyrm/tests/management/__init__.py
new file mode 100644
index 000000000..b6e690fd5
--- /dev/null
+++ b/bookwyrm/tests/management/__init__.py
@@ -0,0 +1 @@
+from . import *
diff --git a/bookwyrm/tests/management/test_populate_streams.py b/bookwyrm/tests/management/test_populate_streams.py
new file mode 100644
index 000000000..6a9b6b8ac
--- /dev/null
+++ b/bookwyrm/tests/management/test_populate_streams.py
@@ -0,0 +1,44 @@
+""" test populating user streams """
+from unittest.mock import patch
+from django.test import TestCase
+
+from bookwyrm import models
+from bookwyrm.management.commands.populate_streams import populate_streams
+
+
+@patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay")
+class Activitystreams(TestCase):
+ """ using redis to build activity streams """
+
+ def setUp(self):
+ """ we need some stuff """
+ self.local_user = models.User.objects.create_user(
+ "mouse", "mouse@mouse.mouse", "password", local=True, localname="mouse"
+ )
+ self.another_user = models.User.objects.create_user(
+ "nutria", "nutria@nutria.nutria", "password", local=True, localname="nutria"
+ )
+ with patch("bookwyrm.models.user.set_remote_server.delay"):
+ self.remote_user = models.User.objects.create_user(
+ "rat",
+ "rat@rat.com",
+ "ratword",
+ local=False,
+ remote_id="https://example.com/users/rat",
+ inbox="https://example.com/users/rat/inbox",
+ outbox="https://example.com/users/rat/outbox",
+ )
+ self.book = models.Edition.objects.create(title="test book")
+
+ def test_populate_streams(self, _):
+ """ make sure the function on the redis manager gets called """
+ with patch("bookwyrm.activitystreams.ActivityStream.add_status"):
+ models.Comment.objects.create(
+ user=self.local_user, content="hi", book=self.book
+ )
+
+ with patch(
+ "bookwyrm.activitystreams.ActivityStream.populate_store"
+ ) as redis_mock:
+ populate_streams()
+ self.assertEqual(redis_mock.call_count, 6) # 2 users x 3 streams
diff --git a/bookwyrm/views/reports.py b/bookwyrm/views/reports.py
index cb1a62ffb..f25664948 100644
--- a/bookwyrm/views/reports.py
+++ b/bookwyrm/views/reports.py
@@ -98,8 +98,7 @@ def make_report(request):
""" a user reports something """
form = forms.ReportForm(request.POST)
if not form.is_valid():
- print(form.errors)
- return redirect(request.headers.get("Referer", "/"))
+ raise ValueError(form.errors)
form.save()
return redirect(request.headers.get("Referer", "/"))