test: fix test_api_upload_bluesheet (#8446)
* test: fix test_api_upload_bluesheet * chore: delint
This commit is contained in:
parent
3ec94225e3
commit
ba1ba6c625
|
@ -560,7 +560,6 @@ class CustomApiTests(TestCase):
|
||||||
recman = recmanrole.person
|
recman = recmanrole.person
|
||||||
meeting = MeetingFactory(type_id="ietf")
|
meeting = MeetingFactory(type_id="ietf")
|
||||||
session = SessionFactory(group__type_id="wg", meeting=meeting)
|
session = SessionFactory(group__type_id="wg", meeting=meeting)
|
||||||
group = session.group
|
|
||||||
apikey = PersonalApiKeyFactory(endpoint=url, person=recman)
|
apikey = PersonalApiKeyFactory(endpoint=url, person=recman)
|
||||||
|
|
||||||
people = [
|
people = [
|
||||||
|
@ -600,18 +599,6 @@ class CustomApiTests(TestCase):
|
||||||
r = self.client.post(url, {"apikey": apikey.hash(), "session_id": session.pk})
|
r = self.client.post(url, {"apikey": apikey.hash(), "session_id": session.pk})
|
||||||
self.assertContains(r, "Missing bluesheet parameter", status_code=400)
|
self.assertContains(r, "Missing bluesheet parameter", status_code=400)
|
||||||
|
|
||||||
r = self.client.post(
|
|
||||||
url,
|
|
||||||
{
|
|
||||||
"apikey": apikey.hash(),
|
|
||||||
"meeting": meeting.number,
|
|
||||||
"group": group.acronym,
|
|
||||||
"item": "1",
|
|
||||||
"bluesheet": "foobar",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
self.assertContains(r, "Invalid json value: 'foobar'", status_code=400)
|
|
||||||
|
|
||||||
bad_session_pk = int(Session.objects.order_by("-pk").first().pk) + 1
|
bad_session_pk = int(Session.objects.order_by("-pk").first().pk) + 1
|
||||||
r = self.client.post(
|
r = self.client.post(
|
||||||
url,
|
url,
|
||||||
|
@ -650,9 +637,7 @@ class CustomApiTests(TestCase):
|
||||||
url,
|
url,
|
||||||
{
|
{
|
||||||
"apikey": apikey.hash(),
|
"apikey": apikey.hash(),
|
||||||
"meeting": meeting.number,
|
"session_id": session.pk,
|
||||||
"group": group.acronym,
|
|
||||||
"item": "1",
|
|
||||||
"bluesheet": bluesheet,
|
"bluesheet": bluesheet,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue