fix test render

This commit is contained in:
Cayo Puigdefabregas 2023-02-28 17:25:42 +01:00
parent 6b9965f57e
commit be271d59ea
2 changed files with 7 additions and 7 deletions

View File

@ -1058,20 +1058,20 @@ class ExportsView(View):
erasures.append(device.privacy)
return erasures
def get_custum_details(self):
def get_costum_details(self):
my_data = None
customer_details = None
if hasattr(g.user, 'sanitization_entity'):
if g.user.sanitization_entity:
my_data = list(g.user.sanitization_entity)[0]
if len(request.referrer.split('/lot/')) > 1:
try:
try:
if len(request.referrer.split('/lot/')) > 1:
lot_id = request.referrer.split('/lot/')[-1].split('/')[0]
lot = Lot.query.filter_by(owner=g.user).filter_by(id=lot_id).first()
customer_details = lot.transfer.customer_details
except Exception:
pass
except Exception:
pass
return my_data, customer_details
def get_server_erasure_hosts(self, erasures):
@ -1094,7 +1094,7 @@ class ExportsView(View):
erasures[0].snapshot.version,
)
my_data, customer_details = self.get_custum_details()
my_data, customer_details = self.get_costum_details()
a, b = self.get_server_erasure_hosts(erasures)
erasures_host, erasures_on_server = a, b

View File

@ -320,7 +320,7 @@ def test_export_certificates(user3: UserClientFlask):
body = str(next(body))
assert status == '200 OK'
assert "PDF-1.5" in body
assert 'hts54322' in body
assert 'e2024242cv86mm'.upper() in body
@pytest.mark.mvp