Eliminate all of the exceptions when running the tests.

This commit is contained in:
jakedt 2014-03-18 15:58:37 -04:00
parent e1b704bdac
commit 6f39e158d6
10 changed files with 50 additions and 10 deletions

View file

@ -29,6 +29,7 @@ class RepositoryList(ApiResource):
'required': [
'repository',
'visibility',
'description',
],
'properties': {
'repository': {
@ -62,6 +63,9 @@ class RepositoryList(ApiResource):
def post(self):
"""Create a new repository."""
owner = get_authenticated_user()
if not owner:
raise Unauthorized()
req = request.get_json()
namespace_name = req['namespace'] if 'namespace' in req else owner.username