Skip to content

Commit

Permalink
Update test docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Ogaday committed Aug 22, 2017
1 parent 1c39632 commit 3434c47
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions tests/test_workspaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

from kbcstorage.workspaces import Workspaces

from .workspace_responses import list_response, detail_response
from .workspace_responses import load_tables_response, create_response
from .workspace_responses import reset_password_response
from .workspace_responses import (list_response, detail_response,
load_tables_response, create_response,
reset_password_response)


class TestWorkspacesEndpointWithMocks(unittest.TestCase):
Expand All @@ -25,7 +25,7 @@ def setUp(self):
@responses.activate
def test_list(self):
"""
Workspace list mocks correctly
Workspace mocks list correctly
"""
responses.add(
responses.Response(
Expand All @@ -40,7 +40,7 @@ def test_list(self):
@responses.activate
def test_detail_by_integer_id(self):
"""
Workspace Endpoint can get mocked detail by integer id
Workspace Endpoint can mock detail by integer id
"""
responses.add(
responses.Response(
Expand All @@ -56,7 +56,7 @@ def test_detail_by_integer_id(self):
@responses.activate
def test_detail_by_str_id(self):
"""
Workspace Endpoint can get mocked detail by integer id
Workspace Endpoint can get mocked detail by string id
"""
responses.add(
responses.Response(
Expand All @@ -72,7 +72,8 @@ def test_detail_by_str_id(self):
@responses.activate
def test_detail_inexsitent_workspace(self):
"""
Workspace Endpoint can get mocked detail by integer id
Workspace Endpoint raises HTTPError when mocking inexistent workspace
detail
"""
msg = ('404 Client Error: Not Found for url: '
'https://connection.keboola.com/v2/storage/workspaces/1')
Expand Down Expand Up @@ -106,7 +107,7 @@ def test_create(self):
@responses.activate
def test_delete(self):
"""
Workspace endpoint deletes mock workspace by id
Workspace endpoint mock deletes workspace by id
"""
responses.add(
responses.Response(
Expand Down Expand Up @@ -141,7 +142,7 @@ def test_delete_inexistent_workspace_raises_404(self):
@responses.activate
def test_load_tables_to_workspace(self):
"""
Workspace endpoint deletes mock workspace by id
Workspace endpoint mock loads table
"""
responses.add(
responses.Response(
Expand All @@ -159,7 +160,7 @@ def test_load_tables_to_workspace(self):
@responses.activate
def test_load_inexistent_tables_to_workspace(self):
"""
Workspace endpoint deletes mock workspace by id
Workspace endpoint raises HTTPError when mock loading inexistent table
"""
msg = ('404 Client Error: Not Found for url: '
'https://connection.keboola.com/v2/storage/workspaces/78432/'
Expand All @@ -181,7 +182,7 @@ def test_load_inexistent_tables_to_workspace(self):
@responses.activate
def test_reset_workspace_password(self):
"""
Reset password for workspace
Workspace endpoint mock resets password for workspace
"""
responses.add(
responses.Response(
Expand All @@ -198,7 +199,8 @@ def test_reset_workspace_password(self):
@responses.activate
def test_reset_password_for_inexistent_workspace(self):
"""
Reset password for inexistent workspace
Workspace endpoint raises HTTPError when mock resetting password for
inexistent workspace
"""
msg = ('404 Client Error: Not Found for url: '
'https://connection.keboola.com/v2/storage/workspaces/1/'
Expand Down

0 comments on commit 3434c47

Please sign in to comment.