mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
bitbake: toaster: toastergui Fix invalid char test and implementation
This test was passing but because the assertion was the wrong way round and should have expected the first one to pass and second one to fail, in reality both were failing as the method for checking the invalid char was incorrect. (Bitbake rev: 932a92b8130d4815656dc885f0c6e4afa4502022) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
913e9b1cbc
commit
8c0ba8d9af
@@ -155,7 +155,7 @@ class ViewTests(TestCase):
|
||||
response = self.client.post(reverse('xhr_importlayer'), args)
|
||||
data = json.loads(response.content)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
self.assertNotEqual(data["error"], "ok")
|
||||
self.assertEqual(data["error"], "ok")
|
||||
|
||||
#Test to verify import of a layer successful
|
||||
args['name'] = "meta-oe"
|
||||
|
||||
@@ -2185,8 +2185,11 @@ if True:
|
||||
layers_added = [];
|
||||
|
||||
# Rudimentary check for any possible html tags
|
||||
if "<" in request.POST:
|
||||
return HttpResponse(jsonfilter({"error": "Invalid character <"}), content_type = "application/json")
|
||||
for val in request.POST.values():
|
||||
if "<" in val:
|
||||
return HttpResponse(jsonfilter(
|
||||
{"error": "Invalid character <"}),
|
||||
content_type="application/json")
|
||||
|
||||
prj = Project.objects.get(pk=request.POST['project_id'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user