Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
15967ddf
Verified
Commit
15967ddf
authored
Nov 06, 2021
by
Baptiste Beauplat
Browse files
Add a test to cover unknown version on index page
parent
e309efef
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/functional/base/test_page.py
View file @
15967ddf
...
...
@@ -26,6 +26,8 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
from
os
import
environ
from
django.test
import
TestCase
from
django.test
import
Client
...
...
@@ -43,6 +45,19 @@ PAGES = (
class
TestBrowsingPage
(
TestCase
):
def
test_debexpo_no_version
(
self
):
client
=
Client
()
path
=
environ
[
'PATH'
]
environ
[
'PATH'
]
=
''
try
:
response
=
client
.
get
(
'/'
)
finally
:
environ
[
'PATH'
]
=
path
self
.
assertEquals
(
response
.
status_code
,
200
)
self
.
assertNotIn
(
'Version'
,
str
(
response
.
content
))
def
test_page_content
(
self
):
client
=
Client
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment