-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Django Upgrade] [ENG-4072] The Rest - Part 2 #10072
Changes from 1 commit
bfc5b8c
b927676
a61cd1b
21bfede
ca45a2a
0375a5a
b3aa28d
9b30044
75a99e2
b311d18
227ee3a
16f7a3a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
import mock | ||
import pytest | ||
from django.utils import timezone | ||
from future.moves.urllib.parse import urlparse | ||
import mock | ||
from nose.tools import * # noqa: | ||
|
||
import pytest | ||
from rest_framework import exceptions | ||
|
||
from addons.wiki.tests.factories import WikiFactory, WikiVersionFactory | ||
from api.base.settings.defaults import API_BASE | ||
|
@@ -33,7 +34,6 @@ | |
WithdrawnRegistrationFactory, | ||
DraftNodeFactory, | ||
) | ||
from rest_framework import exceptions | ||
from tests.base import fake | ||
from tests.utils import assert_latest_log, assert_latest_log_not | ||
from website.views import find_bookmark_collection | ||
|
@@ -480,8 +480,12 @@ def test_node_shows_related_count_for_linked_by_relationships(self, app, user, p | |
assert res.json['data']['relationships']['linked_by_nodes']['links']['related']['meta']['count'] == 1 | ||
assert res.json['data']['relationships']['linked_by_registrations']['links']['related']['meta']['count'] == 1 | ||
|
||
log_date = timezone.now() | ||
project_private.deleted_date = log_date | ||
project_private.deleted = log_date | ||
project_private.is_deleted = True | ||
project_private.save() | ||
registration.reload() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Must reload the |
||
project_public.reload() | ||
|
||
res = app.get(url) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: somehow, when I tried
project_private.remove_node(auth=Auth(user=user))
, the node is not deleted though the method went through the process and returnedTrue
.