Skip to content
Snippets Groups Projects
Commit 4b272955 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[libraries][tests][api] Add missing version field to concerned tests

parent 0ea0c7aa
No related branches found
No related tags found
1 merge request!325Improve new version handling
......@@ -421,7 +421,7 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "valid-name1", "description": "blah"}),
json.dumps({"name": "valid-name1", "version": 1, "description": "blah"}),
content_type="application/json",
)
......@@ -445,7 +445,7 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "valid-name1"}),
json.dumps({"name": "valid-name1", "version": 1}),
content_type="application/json",
)
......@@ -468,7 +468,7 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "invalid name1", "description": "blah"}),
json.dumps({"name": "invalid name1", "version": 1, "description": "blah"}),
content_type="application/json",
)
......@@ -492,7 +492,7 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "invalid name1"}),
json.dumps({"name": "invalid name1", "version": 1}),
content_type="application/json",
)
......@@ -518,6 +518,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "valid-name1",
"version": 1,
"description": "blah",
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
......@@ -549,6 +550,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "valid-name1",
"version": 1,
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
}
......@@ -578,6 +580,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "invalid name1",
"version": 1,
"description": "blah",
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
......@@ -610,6 +613,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "invalid name1",
"version": 1,
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
}
......@@ -636,7 +640,9 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "usable_by_one_user", "description": "blah"}),
json.dumps(
{"name": "usable_by_one_user", "version": 1, "description": "blah"}
),
content_type="application/json",
)
......@@ -647,7 +653,7 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "usable_by_one_user"}),
json.dumps({"name": "usable_by_one_user", "version": 1}),
content_type="application/json",
)
......@@ -658,7 +664,7 @@ class LibraryCreation(LibrariesAPIBase):
response = self.client.post(
self.url,
json.dumps({"name": "library 4", "description": "blah"}),
json.dumps({"name": "library 4", "version": 1, "description": "blah"}),
content_type="application/json",
)
......@@ -668,7 +674,9 @@ class LibraryCreation(LibrariesAPIBase):
self.login_jackdoe()
response = self.client.post(
self.url, json.dumps({"name": "library 4"}), content_type="application/json"
self.url,
json.dumps({"name": "library 4", "version": 1}),
content_type="application/json",
)
self.checkResponse(response, 400, content_type="application/json")
......@@ -681,6 +689,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "usable_by_one_user",
"version": 1,
"description": "blah",
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
......@@ -699,6 +708,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "usable_by_one_user",
"version": 1,
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
}
......@@ -716,6 +726,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "library 4",
"version": 1,
"description": "blah",
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
......@@ -734,6 +745,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "",
"version": 1,
"description": "blah",
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
......@@ -753,6 +765,7 @@ class LibraryCreation(LibrariesAPIBase):
json.dumps(
{
"name": "library 4",
"version": 1,
"declaration": LibrariesAPIBase.DECLARATION,
"code": LibrariesAPIBase.CODE,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment