#2298 Fix copr-frontend FTBFS (F37/Rawhide)
Merged 2 years ago by praiskup. Opened 2 years ago by frostyx.
copr/ frostyx/copr ftbfs-frontend  into  main

@@ -22,7 +22,7 @@ 

  

  

  def get_input_dict():

-     return flask.request.json or dict(flask.request.form)

+     return flask.request.get_json(silent=True) or dict(flask.request.form)

  

  

  def get_input():

@@ -777,6 +777,7 @@ 

          self.transaction_user = user

          self.transaction_username = user.username

          with self.tc as self.test_client:

+             self.test_client.preserve_context = False

              # create one fake request that will setup the session value,

              # and keep the value in the next requests ...

              with self.test_client.session_transaction() as session:

@@ -1,5 +1,6 @@ 

  import os

  import pytest

+ from coprs import models

  from tests.coprs_test_case import CoprsTestCase, TransactionDecorator

  

  
@@ -12,6 +13,8 @@ 

          client = self.api3 if request_type == "api" else self.web_ui

          self.db.session.add(self.c1)

          chroot = self.c1.copr_chroots[0]

+         chroot_id = chroot.id

+ 

          workdir = os.path.join(os.path.dirname(__file__))

          comps_f = os.path.join(workdir, "data", "comps.xml")

          client.edit_chroot(
@@ -19,6 +22,8 @@ 

              comps_filename=comps_f,

              bootstrap_image="image",

          )

+ 

+         chroot = models.CoprChroot.query.get(chroot_id)

          data = "<some><xml></xml></some>\n"

          assert chroot.comps == data

          assert chroot.bootstrap_image == "image"

Build succeeded.

Commit 3c503f3 fixes this pull-request

Pull-Request has been merged by praiskup

2 years ago

Commit 1e368b8 fixes this pull-request

Pull-Request has been merged by praiskup

2 years ago

Commit 2974de9 fixes this pull-request

Pull-Request has been merged by praiskup

2 years ago