Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[LIB-175] add tests
  • Loading branch information
opalczynski committed Jun 7, 2016
commit 9f2dbfb87f79f29c4a2149958f18eeccfa14c1ee
2 changes: 1 addition & 1 deletion syncano/models/accounts.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from syncano.exceptions import SyncanoValueError, SyncanoRequestError, UserNotFound
from syncano.exceptions import SyncanoRequestError, SyncanoValueError, UserNotFound

from . import fields
from .base import Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
from syncano.exceptions import UserNotFound
from syncano.models import User
from tests.integration_test import InstanceMixin, IntegrationTest

Expand Down Expand Up @@ -39,3 +40,18 @@ def test_profile_change_schema(self):
self.user.profile.save()
user = User.please.get(id=self.user.id)
self.assertEqual(user.profile.profile_pic, self.SAMPLE_PROFILE_PIC)


class UserTest(InstanceMixin, IntegrationTest):

@classmethod
def setUpClass(cls):
super(UserProfileTest, cls).setUpClass()

cls.group = cls.instance.groups.create(
name='testgroup'
)

def test_if_custom_error_is_raised_on_user_group(self):
with self.assertRaises(UserNotFound):
self.group.user_details(user_id=221)