Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic view tests to maintain AuthMixin
- Loading branch information
Showing
4 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#----------------------------------------------------------------------------- | ||
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. | ||
# All rights reserved. | ||
# | ||
# The full license is in the file LICENSE.txt, distributed with this software. | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Boilerplate | ||
#----------------------------------------------------------------------------- | ||
import pytest ; pytest | ||
|
||
##----------------------------------------------------------------------------- | ||
# Imports | ||
#----------------------------------------------------------------------------- | ||
|
||
# Bokeh imports | ||
from bokeh.server.views.auth_mixin import AuthMixin | ||
|
||
# Module under test | ||
from bokeh.server.views.metadata_handler import MetadataHandler # isort:skip | ||
|
||
#----------------------------------------------------------------------------- | ||
# Setup | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# General API | ||
#----------------------------------------------------------------------------- | ||
|
||
def test_uses_auth_mixin() -> None: | ||
assert issubclass(MetadataHandler, AuthMixin) | ||
|
||
#----------------------------------------------------------------------------- | ||
# Dev API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Private API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Code | ||
#----------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#----------------------------------------------------------------------------- | ||
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. | ||
# All rights reserved. | ||
# | ||
# The full license is in the file LICENSE.txt, distributed with this software. | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Boilerplate | ||
#----------------------------------------------------------------------------- | ||
import pytest ; pytest | ||
|
||
#----------------------------------------------------------------------------- | ||
# Imports | ||
#----------------------------------------------------------------------------- | ||
|
||
# Bokeh imports | ||
from bokeh.server.views.auth_mixin import AuthMixin | ||
|
||
# Module under test | ||
from bokeh.server.views.root_handler import RootHandler # isort:skip | ||
|
||
#----------------------------------------------------------------------------- | ||
# Setup | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# General API | ||
#----------------------------------------------------------------------------- | ||
|
||
def test_uses_auth_mixin() -> None: | ||
assert issubclass(RootHandler, AuthMixin) | ||
|
||
#----------------------------------------------------------------------------- | ||
# Dev API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Private API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Code | ||
#----------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#----------------------------------------------------------------------------- | ||
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. | ||
# All rights reserved. | ||
# | ||
# The full license is in the file LICENSE.txt, distributed with this software. | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Boilerplate | ||
#----------------------------------------------------------------------------- | ||
import pytest ; pytest | ||
|
||
#----------------------------------------------------------------------------- | ||
# Imports | ||
#----------------------------------------------------------------------------- | ||
|
||
# Bokeh imports | ||
from bokeh.server.views.auth_mixin import AuthMixin | ||
|
||
# Module under test | ||
from bokeh.server.views.session_handler import SessionHandler # isort:skip | ||
|
||
#----------------------------------------------------------------------------- | ||
# Setup | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# General API | ||
#----------------------------------------------------------------------------- | ||
|
||
def test_uses_auth_mixin() -> None: | ||
assert issubclass(SessionHandler, AuthMixin) | ||
|
||
#----------------------------------------------------------------------------- | ||
# Dev API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Private API | ||
#----------------------------------------------------------------------------- | ||
|
||
#----------------------------------------------------------------------------- | ||
# Code | ||
#----------------------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters