Skip to content

Commit

Permalink
Refactor: Move HelloService to the test suite
Browse files Browse the repository at this point in the history
- Refactor: HelloService is just an example; it doesn't need to be
  part of stackinabox proper. Moved it over to the test suite.
  • Loading branch information
BenjamenMeyer committed Apr 21, 2018
1 parent 07cb96c commit f299293
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/changes/latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Breaking Changes
switch just by changing the imports. Previously the utility being supported
had its name in the methods, thus requiring more significant code changes
if one decided to change utilities.
- Moved the HelloService example from stackinabox proper to the test suite

Fixed
-----
Expand Down
3 changes: 2 additions & 1 deletion docs/user/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ to use the Stack-In-A-Box in an actual test:
import stackinabox.util.requests_mock
from stackinabox.stack import StackInABox
from stackinabox.services.hello import HelloService
# from the stackinabox test suite...
from tests.utils.hello import HelloService
class TestRequestsMock(unittest.TestCase):
Expand Down
10 changes: 5 additions & 5 deletions tests/test_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
import requests

from stackinabox import stack
from stackinabox.services import (
hello,
service
)
from stackinabox.services import service
import stackinabox.util.httpretty

from tests.utils import services as test_services
from tests.utils import (
hello,
services as test_services
)


class ExceptionalServices(service.StackInABoxService):
Expand Down
2 changes: 1 addition & 1 deletion tests/util/httpretty/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import stackinabox.util.httpretty
from stackinabox.stack import StackInABox
from stackinabox.services.hello import HelloService

from tests.utils.services import AdvancedService
from tests.utils.hello import HelloService


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/util/httpretty/test_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import requests

from stackinabox.util.httpretty import decorator
from stackinabox.services.hello import HelloService

from tests.utils.services import AdvancedService
from tests.utils.hello import HelloService


class TestHttprettyBasicWithDecoratorErrors(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion tests/util/requests_mock/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import stackinabox.util.requests_mock
from stackinabox.util.requests_mock import core
from stackinabox.stack import StackInABox
from stackinabox.services.hello import HelloService

from tests.utils.services import AdvancedService
from tests.utils.hello import HelloService


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/util/requests_mock/test_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import requests

from stackinabox.util.requests_mock import decorator
from stackinabox.services.hello import HelloService

from tests.utils.services import AdvancedService
from tests.utils.hello import HelloService


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/util/response/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import stackinabox.util.responses
from stackinabox.stack import StackInABox
from stackinabox.services.hello import HelloService

from tests.utils.services import AdvancedService
from tests.utils.hello import HelloService


logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/util/response/test_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import requests

from stackinabox.util.responses import decorator
from stackinabox.services.hello import HelloService

from tests.utils.services import AdvancedService
from tests.utils.hello import HelloService


logger = logging.getLogger(__name__)
Expand Down
File renamed without changes.

0 comments on commit f299293

Please sign in to comment.