Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
9a3f8d9a
Commit
9a3f8d9a
authored
Nov 30, 2016
by
Asif Saifuddin Auvi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
converted asserts of descriptions test to pytest
parent
01cd0915
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
tests/test_description.py
+5
-5
No files found.
tests/test_description.py
View file @
9a3f8d9a
...
...
@@ -60,7 +60,7 @@ class TestViewNamesAndDescriptions(TestCase):
"""
class
MockView
(
APIView
):
pass
self
.
assertEqual
(
MockView
()
.
get_view_name
(),
'Mock'
)
assert
MockView
()
.
get_view_name
()
==
'Mock'
def
test_view_description_uses_docstring
(
self
):
"""Ensure view descriptions are based on the docstring."""
...
...
@@ -80,7 +80,7 @@ class TestViewNamesAndDescriptions(TestCase):
# hash style header #"""
self
.
assertEqual
(
MockView
()
.
get_view_description
(),
DESCRIPTION
)
assert
MockView
()
.
get_view_description
()
==
DESCRIPTION
def
test_view_description_can_be_empty
(
self
):
"""
...
...
@@ -89,7 +89,7 @@ class TestViewNamesAndDescriptions(TestCase):
"""
class
MockView
(
APIView
):
pass
self
.
assertEqual
(
MockView
()
.
get_view_description
(),
''
)
assert
MockView
()
.
get_view_description
()
==
''
def
test_view_description_can_be_promise
(
self
):
"""
...
...
@@ -111,7 +111,7 @@ class TestViewNamesAndDescriptions(TestCase):
class
MockView
(
APIView
):
__doc__
=
MockLazyStr
(
"a gettext string"
)
self
.
assertEqual
(
MockView
()
.
get_view_description
(),
'a gettext string'
)
assert
MockView
()
.
get_view_description
()
==
'a gettext string'
def
test_markdown
(
self
):
"""
...
...
@@ -120,7 +120,7 @@ class TestViewNamesAndDescriptions(TestCase):
if
apply_markdown
:
gte_21_match
=
apply_markdown
(
DESCRIPTION
)
==
MARKED_DOWN_gte_21
lt_21_match
=
apply_markdown
(
DESCRIPTION
)
==
MARKED_DOWN_lt_21
self
.
assertTrue
(
gte_21_match
or
lt_21_match
)
assert
gte_21_match
or
lt_21_match
def
test_dedent_tabs
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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