Skip to content

Commit

Permalink
Tweak help message in initdev
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed Apr 12, 2018
1 parent 570002a commit 521be80
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions initdev
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DEFAULT='\033[0m'
echo ""
echo "================================================================================"
echo ""
echo "Note: running 'initdev' after already having used it previously to setup Misago"
echo "Note: running 'initdev' after already having used it to setup Misago"
echo "for development may result in any of following errors occuring:"
echo ""
echo " - CommandError: /srv/misago/... already exists, overlaying a project or app into an existing directory won't replace conflicting files"
Expand All @@ -47,7 +47,7 @@ echo " - django.core.exceptions.ImproperlyConfigured: settings.DATABASES is imp
echo " - python: can't open file 'manage.py': [Errno 2] No such file or directory"
echo ""
echo "If you are experiencing either of those errors, this means that files are"
echo "present in the repository\'s main directory preventing 'initdev' from succedding."
echo "present in the repository's main directory preventing 'initdev' from succedding."
echo "Please try running the 'initdev' with \"--f\" option to force old files deletion:"
echo ""
echo " docker-compose run --rm misago initdev --f"
Expand Down
10 changes: 7 additions & 3 deletions misago/threads/tests/test_thread_reply_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def test_cant_reply_thread_as_guest(self):

response = self.client.post(self.api_link)
self.assertEqual(response.status_code, 403)
self.assertEqual(response.json(), {
'detail': "You can't reply to threads in this category.",
})

def test_thread_visibility(self):
"""thread's visibility is validated"""
Expand All @@ -63,9 +66,10 @@ def test_cant_reply_thread(self):
self.override_acl({'can_reply_threads': 0})

response = self.client.post(self.api_link)
self.assertContains(
response, "You can't reply to threads in this category.", status_code=403
)
self.assertEqual(response.status_code, 403)
self.assertEqual(response.json(), {
'detail': "You can't reply to threads in this category.",
})

def test_closed_category(self):
"""permssion to reply in closed category is validated"""
Expand Down

0 comments on commit 521be80

Please sign in to comment.