Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hub
ViralHostRangeDB
Commits
55d53faf
Commit
55d53faf
authored
Feb 03, 2022
by
Bryan BRANCOTTE
Browse files
add a curator
parent
b05cfff2
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/viralhostrange/viralhostrangedb/tests/base_test_case.py
View file @
55d53faf
...
...
@@ -86,13 +86,13 @@ class OneDataSourceTestCase(TestCase):
Group
.
objects
.
get
(
name
=
"Admin"
).
user_set
.
add
(
self
.
staff_admin
)
################################################################################
self
.
curator
=
get_user_model
().
objects
.
create
(
self
.
u_
curator
=
get_user_model
().
objects
.
create
(
username
=
"u_curator"
,
first_name
=
"curatorF"
,
last_name
=
"curatorL"
,
email
=
"u_curator@a.b"
,
)
business_process
.
set_curator
(
self
.
curator
,
True
)
business_process
.
set_curator
(
self
.
u_
curator
,
True
)
################################################################################
self
.
user
=
get_user_model
().
objects
.
create
(
...
...
src/viralhostrange/viralhostrangedb/tests/test_changes_notifications.py
View file @
55d53faf
...
...
@@ -38,13 +38,13 @@ class DataSourceChangeNotificationTestCase(base_test_case.OneDataSourceTestCase)
assert
e
.
errno
==
errno
.
EEXIST
,
e
super
().
setUp
()
################################################################################
self
.
u_curator
=
get_user_model
().
objects
.
create
(
username
=
"u_curator"
,
first_name
=
"Dany"
,
last_name
=
"u_curatorL"
,
email
=
"u_curator@a.b"
,
)
business_process
.
set_curator
(
self
.
u_curator
,
True
)
#
self.u_curator = get_user_model().objects.create(
#
username="u_curator",
#
first_name="Dany",
#
last_name="u_curatorL",
#
email="u_curator@a.b",
#
)
#
business_process.set_curator(self.u_curator, True)
self
.
ds
.
public
=
True
self
.
ds
.
save
()
...
...
src/viralhostrange/viralhostrangedb/tests/test_history.py
View file @
55d53faf
...
...
@@ -62,7 +62,7 @@ class DataSourceHistoryTestCase(base_test_case.OneDataSourceTestCase):
self
.
assertEqual
(
self
.
client
.
get
(
url_restore
).
status_code
,
200
)
self
.
assertEqual
(
self
.
client
.
post
(
url_restore
,
dict
(
agree
=
"True"
)).
status_code
,
302
)
self
.
client
.
force_login
(
self
.
curator
)
self
.
client
.
force_login
(
self
.
u_
curator
)
self
.
ds
.
public
=
True
self
.
ds
.
save
()
self
.
assertEqual
(
self
.
client
.
get
(
url_see
).
status_code
,
200
)
...
...
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