Add ability to dismiss notifications

This commit is contained in:
Joseph Schorr 2014-07-28 18:23:46 -04:00
parent 34fc279092
commit 32b2ecdfa6
9 changed files with 162 additions and 11 deletions

View file

@ -21,7 +21,7 @@ from endpoints.api.trigger import (BuildTriggerActivate, BuildTriggerSources, Bu
from endpoints.api.repoemail import RepositoryAuthorizedEmail
from endpoints.api.repositorynotification import RepositoryNotification, RepositoryNotificationList
from endpoints.api.user import (PrivateRepositories, ConvertToOrganization, Recovery, Signout,
Signin, User, UserAuthorizationList, UserAuthorization)
Signin, User, UserAuthorizationList, UserAuthorization, UserNotification)
from endpoints.api.repotoken import RepositoryToken, RepositoryTokenList
from endpoints.api.prototype import PermissionPrototype, PermissionPrototypeList
from endpoints.api.logs import UserLogs, OrgLogs, RepositoryLogs
@ -123,6 +123,37 @@ class TestFindRepositories(ApiTestCase):
self._run_test('GET', 200, 'devtable', None)
class TestUserNotification(ApiTestCase):
def setUp(self):
ApiTestCase.setUp(self)
self._set_url(UserNotification, uuid='someuuid')
def test_get_anonymous(self):
self._run_test('GET', 401, None, None)
def test_get_freshuser(self):
self._run_test('GET', 404, 'freshuser', None)
def test_get_reader(self):
self._run_test('GET', 404, 'reader', None)
def test_get_devtable(self):
self._run_test('GET', 404, 'devtable', None)
def test_put_anonymous(self):
self._run_test('PUT', 401, None, {})
def test_put_freshuser(self):
self._run_test('PUT', 404, 'freshuser', {})
def test_put_reader(self):
self._run_test('PUT', 404, 'reader', {})
def test_put_devtable(self):
self._run_test('PUT', 404, 'devtable', {})
class TestUserInvoiceList(ApiTestCase):
def setUp(self):
ApiTestCase.setUp(self)