fix test render
This commit is contained in:
parent
6b9965f57e
commit
be271d59ea
|
@ -1058,15 +1058,15 @@ class ExportsView(View):
|
||||||
erasures.append(device.privacy)
|
erasures.append(device.privacy)
|
||||||
return erasures
|
return erasures
|
||||||
|
|
||||||
def get_custum_details(self):
|
def get_costum_details(self):
|
||||||
my_data = None
|
my_data = None
|
||||||
customer_details = None
|
customer_details = None
|
||||||
if hasattr(g.user, 'sanitization_entity'):
|
if hasattr(g.user, 'sanitization_entity'):
|
||||||
if g.user.sanitization_entity:
|
if g.user.sanitization_entity:
|
||||||
my_data = list(g.user.sanitization_entity)[0]
|
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_id = request.referrer.split('/lot/')[-1].split('/')[0]
|
||||||
lot = Lot.query.filter_by(owner=g.user).filter_by(id=lot_id).first()
|
lot = Lot.query.filter_by(owner=g.user).filter_by(id=lot_id).first()
|
||||||
customer_details = lot.transfer.customer_details
|
customer_details = lot.transfer.customer_details
|
||||||
|
@ -1094,7 +1094,7 @@ class ExportsView(View):
|
||||||
erasures[0].snapshot.version,
|
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)
|
a, b = self.get_server_erasure_hosts(erasures)
|
||||||
erasures_host, erasures_on_server = a, b
|
erasures_host, erasures_on_server = a, b
|
||||||
|
|
|
@ -320,7 +320,7 @@ def test_export_certificates(user3: UserClientFlask):
|
||||||
body = str(next(body))
|
body = str(next(body))
|
||||||
assert status == '200 OK'
|
assert status == '200 OK'
|
||||||
assert "PDF-1.5" in body
|
assert "PDF-1.5" in body
|
||||||
assert 'hts54322' in body
|
assert 'e2024242cv86mm'.upper() in body
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.mvp
|
@pytest.mark.mvp
|
||||||
|
|
Reference in New Issue