Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-notes-api
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
edx-notes-api
Commits
5c12b030
Commit
5c12b030
authored
Jan 05, 2015
by
Oleg Marshev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix docstr.
parent
7a5c5919
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
notesapi/v1/tests/test_views.py
+3
-1
No files found.
notesapi/v1/tests/test_views.py
View file @
5c12b030
...
@@ -152,14 +152,16 @@ class AnnotationViewTests(BaseAnnotationViewTests):
...
@@ -152,14 +152,16 @@ class AnnotationViewTests(BaseAnnotationViewTests):
def
test_delete_es_disabled
(
self
):
def
test_delete_es_disabled
(
self
):
"""
"""
Ensure we can
crea
te note in database when elasticsearch is disabled.
Ensure we can
dele
te note in database when elasticsearch is disabled.
"""
"""
url
=
reverse
(
'api:v1:annotations'
)
url
=
reverse
(
'api:v1:annotations'
)
response
=
self
.
client
.
post
(
url
,
self
.
payload
,
format
=
'json'
)
response
=
self
.
client
.
post
(
url
,
self
.
payload
,
format
=
'json'
)
get_es
()
.
indices
.
refresh
()
get_es
()
.
indices
.
refresh
()
self
.
assertEqual
(
note_searcher
.
filter
(
id
=
response
.
data
[
'id'
])
.
count
(),
1
)
self
.
assertEqual
(
note_searcher
.
filter
(
id
=
response
.
data
[
'id'
])
.
count
(),
1
)
with
patch
(
'django.conf.settings.ES_DISABLED'
,
True
):
with
patch
(
'django.conf.settings.ES_DISABLED'
,
True
):
Note
.
objects
.
get
(
id
=
response
.
data
[
'id'
])
.
delete
()
Note
.
objects
.
get
(
id
=
response
.
data
[
'id'
])
.
delete
()
self
.
assertEqual
(
note_searcher
.
filter
(
id
=
response
.
data
[
'id'
])
.
count
(),
1
)
self
.
assertEqual
(
note_searcher
.
filter
(
id
=
response
.
data
[
'id'
])
.
count
(),
1
)
def
test_create_ignore_created
(
self
):
def
test_create_ignore_created
(
self
):
...
...
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