Merge pull request #347 from eReuse/changes/3775-change-names-real-abstract

modify abstract for snapshot and real for placeholder
This commit is contained in:
cayop 2022-09-15 12:19:37 +02:00 committed by GitHub
commit c9809061c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 86 additions and 82 deletions

View File

@ -1671,8 +1671,8 @@ class BindingForm(FlaskForm):
self.phid.errors = [txt] self.phid.errors = [txt]
return False return False
if self.device.is_abstract() not in ['Abstract', 'Real']: if self.device.is_abstract() not in ['Snapshot', 'Placeholder']:
txt = "This is not a Abstract or Real device." txt = "This is not a Snapshot or Placeholder device."
self.phid.errors = [txt] self.phid.errors = [txt]
return False return False
@ -1686,7 +1686,7 @@ class BindingForm(FlaskForm):
self.phid.errors = [txt] self.phid.errors = [txt]
return False return False
if self.placeholder.status not in ['Abstract', 'Real']: if self.placeholder.status not in ['Snapshot', 'Placeholder']:
txt = "This placeholder have a binding with other device. " txt = "This placeholder have a binding with other device. "
txt += "Before you need to do an unbinding with this other device." txt += "Before you need to do an unbinding with this other device."
self.phid.errors = [txt] self.phid.errors = [txt]

View File

@ -235,9 +235,9 @@ class BindingView(GenericMixin):
messages.error('Device Phid: "{}" not exist!'.format(self.phid)) messages.error('Device Phid: "{}" not exist!'.format(self.phid))
return True return True
if self.old_device.placeholder.status != 'Abstract': if self.old_device.placeholder.status != 'Snapshot':
messages.error( messages.error(
'Device Dhid: "{}" is not a Abstract device!'.format(self.dhid) 'Device Dhid: "{}" is not a Snapshot device!'.format(self.dhid)
) )
return True return True
@ -267,10 +267,10 @@ class BindingView(GenericMixin):
if not self.new_placeholder: if not self.new_placeholder:
return return
if self.old_device.placeholder.status == 'Abstract': if self.old_device.placeholder.status == 'Snapshot':
self.new_device = self.new_placeholder.device self.new_device = self.new_placeholder.device
self.old_placeholder = self.old_device.placeholder self.old_placeholder = self.old_device.placeholder
elif self.old_device.placeholder.status == 'Real': elif self.old_device.placeholder.status == 'Placeholder':
self.new_device = self.old_device self.new_device = self.old_device
self.old_placeholder = self.new_placeholder self.old_placeholder = self.new_placeholder
self.old_device = self.old_placeholder.device self.old_device = self.old_placeholder.device
@ -308,8 +308,8 @@ class BindingView(GenericMixin):
db.session.commit() db.session.commit()
next_url = url_for('inventory.device_details', id=self.real_dhid) next_url = url_for('inventory.device_details', id=self.real_dhid)
txt = 'Device real with PHID: {} and DHID: {} bind successfully with ' txt = 'Device placeholder with PHID: {} and DHID: {} bind successfully with '
txt += 'device abstract PHID: {} DHID: {}.' txt += 'device snapshot PHID: {} DHID: {}.'
messages.success( messages.success(
txt.format( txt.format(
self.real_phid, self.real_dhid, self.abstract_phid, self.abstract_dhid self.real_phid, self.real_dhid, self.abstract_phid, self.abstract_dhid
@ -527,7 +527,7 @@ class DeviceCreateView(GenericMixin):
amount = form.amount.data amount = form.amount.data
tpy = form.type.data tpy = form.type.data
txt = f'{amount} real Device "{tpy}" created successfully.' txt = f'{amount} placeholders Device "{tpy}" created successfully.'
placeholder = ( placeholder = (
Placeholder.query.filter_by(owner=g.user) Placeholder.query.filter_by(owner=g.user)
.order_by(Placeholder.id.desc()) .order_by(Placeholder.id.desc())
@ -536,7 +536,7 @@ class DeviceCreateView(GenericMixin):
if amount == 1 and placeholder: if amount == 1 and placeholder:
phid = placeholder.phid phid = placeholder.phid
dhid = placeholder.device.devicehub_id dhid = placeholder.device.devicehub_id
txt = f'Device "{tpy}" real with PHID {phid} and DHID {dhid} ' txt = f'Device "{tpy}" placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
messages.success(txt) messages.success(txt)
return flask.redirect(next_url) return flask.redirect(next_url)

View File

@ -683,13 +683,13 @@ class Device(Thing):
def is_abstract(self): def is_abstract(self):
if self.placeholder: if self.placeholder:
if self.placeholder.is_abstract: if self.placeholder.is_abstract:
return 'Abstract' return 'Snapshot'
if self.placeholder.binding: if self.placeholder.binding:
return 'Twin' return 'Twin'
return 'Real' return 'Placeholder'
if self.binding: if self.binding:
if self.binding.is_abstract: if self.binding.is_abstract:
return 'Abstract' return 'Snapshot'
return 'Twin' return 'Twin'
return '' return ''
@ -952,10 +952,10 @@ class Placeholder(Thing):
@property @property
def status(self): def status(self):
if self.is_abstract: if self.is_abstract:
return 'Abstract' return 'Snapshot'
if self.binding: if self.binding:
return 'Twin' return 'Twin'
return 'Real' return 'Placeholder'
class Computer(Device): class Computer(Device):

View File

@ -252,16 +252,16 @@ class BaseDeviceRow(OrderedDict):
self['Benchmark RamSysbench (points)'] = '' self['Benchmark RamSysbench (points)'] = ''
# Placeholder # Placeholder
self['PHID'] = '' self['PHID'] = ''
self['Is Abstract'] = '' self['Is Snapshot'] = ''
self['Pallet'] = '' self['Pallet'] = ''
self['id Supplier'] = '' self['id Supplier'] = ''
self['Real Info'] = '' self['Placeholder Info'] = ''
self['Real Components'] = '' self['Placeholder Components'] = ''
self['Real Type'] = '' self['Placeholder Type'] = ''
self['Real Serial Number'] = '' self['Placeholder Serial Number'] = ''
self['Real Part Number'] = '' self['Placeholder Part Number'] = ''
self['Real Model'] = '' self['Placeholder Model'] = ''
self['Real Manufacturer'] = '' self['Placeholder Manufacturer'] = ''
class DeviceRow(BaseDeviceRow): class DeviceRow(BaseDeviceRow):
@ -506,16 +506,20 @@ class DeviceRow(BaseDeviceRow):
def get_placeholder_datas(self): def get_placeholder_datas(self):
# Placeholder # Placeholder
self['PHID'] = none2str(self.placeholder.phid) self['PHID'] = none2str(self.placeholder.phid)
self['Is Abstract'] = none2str(self.device.is_abstract()) self['Is Snapshot'] = none2str(self.device.is_abstract())
self['Pallet'] = none2str(self.placeholder.pallet) self['Pallet'] = none2str(self.placeholder.pallet)
self['id Supplier'] = none2str(self.placeholder.id_device_supplier) self['id Supplier'] = none2str(self.placeholder.id_device_supplier)
self['Real Info'] = none2str(self.placeholder.info) self['Placeholder Info'] = none2str(self.placeholder.info)
self['Real Components'] = none2str(self.placeholder.components) self['Placeholder Components'] = none2str(self.placeholder.components)
self['Real Type'] = none2str(self.placeholder.device.type) self['Placeholder Type'] = none2str(self.placeholder.device.type)
self['Real Manufacturer'] = none2str(self.placeholder.device.manufacturer) self['Placeholder Manufacturer'] = none2str(
self['Real Model'] = none2str(self.placeholder.device.model) self.placeholder.device.manufacturer
self['Real Part Number'] = none2str(self.placeholder.device.part_number) )
self['Real Serial Number'] = none2str(self.placeholder.device.serial_number) self['Placeholder Model'] = none2str(self.placeholder.device.model)
self['Placeholder Part Number'] = none2str(self.placeholder.device.part_number)
self['Placeholder Serial Number'] = none2str(
self.placeholder.device.serial_number
)
class StockRow(OrderedDict): class StockRow(OrderedDict):

View File

@ -23,15 +23,15 @@
<p>This is a binding between:&nbsp; <p>This is a binding between:&nbsp;
<ul> <ul>
{% if new_placeholder.is_abstract %} {% if new_placeholder.is_abstract %}
<li>1. Device abstract with DHID:<b>{{ new_placeholder.device.devicehub_id }}</b> and PHID: <b>{{ new_placeholder.phid }}</b></li> <li>1. Device snapshot with DHID:<b>{{ new_placeholder.device.devicehub_id }}</b> and PHID: <b>{{ new_placeholder.phid }}</b></li>
<li>2. Device real with DHID: <b>{{ old_placeholder.device.devicehub_id }}</b> and PHID:<b>{{ old_placeholder.phid }}</b></li> <li>2. Device placeholder with DHID: <b>{{ old_placeholder.device.devicehub_id }}</b> and PHID:<b>{{ old_placeholder.phid }}</b></li>
{% else %} {% else %}
<li>1. Device abstract with DHID:<b>{{ old_placeholder.device.devicehub_id }}</b> and PHID: <b>{{ old_placeholder.phid }}</b></li> <li>1. Device snapshot with DHID:<b>{{ old_placeholder.device.devicehub_id }}</b> and PHID: <b>{{ old_placeholder.phid }}</b></li>
<li>2. Device real with DHID: <b>{{ new_placeholder.device.devicehub_id }}</b> and PHID:<b>{{ new_placeholder.phid }}</b></li> <li>2. Device placeholder with DHID: <b>{{ new_placeholder.device.devicehub_id }}</b> and PHID:<b>{{ new_placeholder.phid }}</b></li>
{% endif %} {% endif %}
</ul> </ul>
</p> </p>
<p>The DHID and PHID information of the abstract will be lost.</p> <p>The DHID and PHID information of the snapshot will be lost.</p>
<p>The information in <span class="text-danger">red colour</span> will be losted and replaced by the information in <span class="text-success">green colour</span>.<br /> <p>The information in <span class="text-danger">red colour</span> will be losted and replaced by the information in <span class="text-success">green colour</span>.<br />
The information in <span class="text-warning">orange</span> will be replaced by the information in <span class="text-success">green</span> and you always can recover The information in <span class="text-warning">orange</span> will be replaced by the information in <span class="text-success">green</span> and you always can recover
it by doing an unbinding action or find this information into device details web. it by doing an unbinding action or find this information into device details web.
@ -43,7 +43,7 @@
<tr class="text-center"> <tr class="text-center">
<th scope="col">Basic Data</th> <th scope="col">Basic Data</th>
<th scope="col">Info Twin device</th> <th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -128,7 +128,7 @@
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Info Twin device</th> <th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -153,13 +153,13 @@
{% if actions %} {% if actions %}
<h2>Actions</h2> <h2>Actions</h2>
<p> <p>
The actions will become real device and will no longer be in the abstract The actions will become placeholder device and will no longer be in the snapshot
</p> </p>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Info Twin device</th> <th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -181,13 +181,13 @@
{% if tags %} {% if tags %}
<h2>Tags</h2> <h2>Tags</h2>
<p> <p>
The tags will become real device and will no longer be in the abstract The tags will become placeholder device and will no longer be in the snapshot
</p> </p>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Info Twin device</th> <th scope="col">Info Twin device</th>
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

View File

@ -42,7 +42,7 @@
</li> </li>
</ul> </ul>
</div> </div>
{% if placeholder.status in ['Abstract', 'Real'] %} {% if placeholder.status in ['Snapshot', 'Placeholder'] %}
<a type="button" href="{{ url_for('inventory.binding_search', dhid=placeholder.device.devicehub_id) }}" class="btn btn-primary" style="float: right; margin-right: 15px;"> <a type="button" href="{{ url_for('inventory.binding_search', dhid=placeholder.device.devicehub_id) }}" class="btn btn-primary" style="float: right; margin-right: 15px;">
New Twin New Twin
</a> </a>
@ -232,13 +232,13 @@
</div> </div>
<div class="tab-pane fade profile-overview" id="components"> <div class="tab-pane fade profile-overview" id="components">
<h5 class="card-title">Components Real part</h5> <h5 class="card-title">Components Placeholder</h5>
<div class="list-group col-6"> <div class="list-group col-6">
{{ placeholder.components or '' }} {{ placeholder.components or '' }}
</div> </div>
{% if placeholder.binding %} {% if placeholder.binding %}
<h5 class="card-title">Components Abstract part</h5> <h5 class="card-title">Components Snapshot</h5>
<div class="list-group col-6"> <div class="list-group col-6">
{% for component in placeholder.binding.components|sort(attribute='type') %} {% for component in placeholder.binding.components|sort(attribute='type') %}
<div class="list-group-item"> <div class="list-group-item">

View File

@ -291,7 +291,7 @@
<div class="btn-group dropdown m-1" uib-dropdown=""> <div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-laptop"></i> <i class="bi bi-laptop"></i>
New Devices Real New Devices Placeholders
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnSnapshot"> <ul class="dropdown-menu" aria-labelledby="btnSnapshot">
<li> <li>
@ -301,7 +301,7 @@
<a href="{{ url_for('inventory.upload_placeholder') }}" class="dropdown-item"> <a href="{{ url_for('inventory.upload_placeholder') }}" class="dropdown-item">
{% endif %} {% endif %}
<i class="bi bi-upload"></i> <i class="bi bi-upload"></i>
Upload Placeholder Spreadsheet Upload Spreadsheet
</a> </a>
</li> </li>
<li> <li>
@ -311,7 +311,7 @@
<a href="{{ url_for('inventory.device_add') }}" class="dropdown-item"> <a href="{{ url_for('inventory.device_add') }}" class="dropdown-item">
{% endif %} {% endif %}
<i class="bi bi-plus"></i> <i class="bi bi-plus"></i>
Create a new Placeholder Create a new
</a> </a>
</li> </li>
</ul> </ul>
@ -320,7 +320,7 @@
<div class="btn-group dropdown m-1" uib-dropdown=""> <div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-laptop"></i> <i class="bi bi-laptop"></i>
New Devices Abstract New Devices Snapshot
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnSnapshot"> <ul class="dropdown-menu" aria-labelledby="btnSnapshot">
<li> <li>
@ -330,7 +330,7 @@
<a href="{{ url_for('inventory.upload_snapshot') }}" class="dropdown-item"> <a href="{{ url_for('inventory.upload_snapshot') }}" class="dropdown-item">
{% endif %} {% endif %}
<i class="bi bi-upload"></i> <i class="bi bi-upload"></i>
Upload Snapshot files Upload files
</a> </a>
</li> </li>
</ul> </ul>

View File

@ -201,7 +201,7 @@
<div class="btn-group dropdown m-1" uib-dropdown=""> <div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-laptop"></i> <i class="bi bi-laptop"></i>
New Device Real New Device Placeholder
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnSnapshot"> <ul class="dropdown-menu" aria-labelledby="btnSnapshot">
<li> <li>
@ -211,7 +211,7 @@
<a href="{{ url_for('inventory.upload_placeholder') }}" class="dropdown-item"> <a href="{{ url_for('inventory.upload_placeholder') }}" class="dropdown-item">
{% endif %} {% endif %}
<i class="bi bi-upload"></i> <i class="bi bi-upload"></i>
Upload Placeholder Spreadsheet Upload Spreadsheet
</a> </a>
</li> </li>
<li> <li>
@ -221,7 +221,7 @@
<a href="{{ url_for('inventory.device_add') }}" class="dropdown-item"> <a href="{{ url_for('inventory.device_add') }}" class="dropdown-item">
{% endif %} {% endif %}
<i class="bi bi-plus"></i> <i class="bi bi-plus"></i>
Create a new Placeholder Create a new
</a> </a>
</li> </li>
</ul> </ul>
@ -230,7 +230,7 @@
<div class="btn-group dropdown m-1" uib-dropdown=""> <div class="btn-group dropdown m-1" uib-dropdown="">
<button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> <button id="btnSnapshot" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-laptop"></i> <i class="bi bi-laptop"></i>
New Device Abstract New Device Snapshot
</button> </button>
<ul class="dropdown-menu" aria-labelledby="btnSnapshot"> <ul class="dropdown-menu" aria-labelledby="btnSnapshot">
<li> <li>
@ -240,7 +240,7 @@
<a href="{{ url_for('inventory.upload_snapshot') }}" class="dropdown-item"> <a href="{{ url_for('inventory.upload_snapshot') }}" class="dropdown-item">
{% endif %} {% endif %}
<i class="bi bi-upload"></i> <i class="bi bi-upload"></i>
Upload Snapshot files Upload files
</a> </a>
</li> </li>
</ul> </ul>

View File

@ -26,8 +26,8 @@
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Basic Data</th> <th scope="col">Basic Data</th>
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
<th scope="col">Info Real device</th> <th scope="col">Info Placeholder device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -111,8 +111,8 @@
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
<th scope="col">Info Real device</th> <th scope="col">Info Placeholder device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -132,13 +132,13 @@
{% if placeholder.device.manual_actions or placeholder.binding.manual_actions %} {% if placeholder.device.manual_actions or placeholder.binding.manual_actions %}
<h2>Actions</h2> <h2>Actions</h2>
<p> <p>
The actions will become real device and will no longer be in the abstract The actions will become placeholder device and will no longer be in the placeholder
</p> </p>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
<th scope="col">Info Real device</th> <th scope="col">Info Placeholder device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -161,13 +161,13 @@
{% if placeholder.device.tags %} {% if placeholder.device.tags %}
<h2>Tags</h2> <h2>Tags</h2>
<p> <p>
The tags will become real device and will no longer be in the abstract The tags will become placeholder device and will no longer be in the placeholder
</p> </p>
<table class="table table-hover"> <table class="table table-hover">
<thead> <thead>
<tr class="text-center"> <tr class="text-center">
<th scope="col">Info Abstract device</th> <th scope="col">Info Snapshot device</th>
<th scope="col">Info Real device</th> <th scope="col">Info Placeholder device</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -457,7 +457,7 @@ def test_add_monitor(user3: UserClientFlask):
assert phid == '1' assert phid == '1'
assert dhid == 'O48N2' assert dhid == 'O48N2'
txt = f'Device &#34;{typ}&#34; real with PHID {phid} and DHID {dhid} ' txt = f'Device &#34;{typ}&#34; placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
assert txt in body assert txt in body
@ -500,7 +500,7 @@ def test_update_monitor(user3: UserClientFlask):
assert dev.depth == 0.1 assert dev.depth == 0.1
assert dev.placeholder.pallet == "l34" assert dev.placeholder.pallet == "l34"
txt = f'Device &#34;{typ}&#34; real with PHID {phid} and DHID {dhid} ' txt = f'Device &#34;{typ}&#34; placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
assert txt in body assert txt in body
@ -569,7 +569,7 @@ def test_add_2_monitor(user3: UserClientFlask):
assert dev.model == 'lc27t55' assert dev.model == 'lc27t55'
assert dev.placeholder.pallet == "l34" assert dev.placeholder.pallet == "l34"
txt = f'Device &#34;{typ}&#34; real with PHID {phid} and DHID {dhid} ' txt = f'Device &#34;{typ}&#34; placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
assert txt in body assert txt in body
@ -603,7 +603,7 @@ def test_add_2_monitor(user3: UserClientFlask):
assert dhid == 'E39W3' assert dhid == 'E39W3'
txt = f'Device &#34;{typ}&#34; real with PHID {phid} and DHID {dhid} ' txt = f'Device &#34;{typ}&#34; placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
assert txt in body assert txt in body
@ -642,7 +642,7 @@ def test_add_laptop(user3: UserClientFlask):
assert phid == '1' assert phid == '1'
assert dhid == 'O48N2' assert dhid == 'O48N2'
txt = f'Device &#34;{typ}&#34; real with PHID {phid} and DHID {dhid} ' txt = f'Device &#34;{typ}&#34; placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
assert txt in body assert txt in body
@ -672,7 +672,7 @@ def test_add_with_ammount_laptops(user3: UserClientFlask):
} }
body, status = user3.post(uri, data=data) body, status = user3.post(uri, data=data)
assert status == '200 OK' assert status == '200 OK'
assert f'{num} real Device &#34;Laptop&#34; created successfully.' in body assert f'{num} placeholders Device &#34;Laptop&#34; created successfully.' in body
for dev in Device.query.all(): for dev in Device.query.all():
assert dev.type == 'Laptop' assert dev.type == 'Laptop'
@ -1798,7 +1798,7 @@ def test_edit_laptop(user3: UserClientFlask):
assert phid == '1' assert phid == '1'
assert dhid == 'O48N2' assert dhid == 'O48N2'
txt = f'Device &#34;{typ}&#34; real with PHID {phid} and DHID {dhid} ' txt = f'Device &#34;{typ}&#34; placeholder with PHID {phid} and DHID {dhid} '
txt += 'created successfully' txt += 'created successfully'
assert txt in body assert txt in body
@ -2116,8 +2116,8 @@ def test_manual_binding(user3: UserClientFlask):
# action binding # action binding
body, status = user3.post(uri, data={}) body, status = user3.post(uri, data={})
assert status == '200 OK' assert status == '200 OK'
txt = f"Device real with PHID: {phid_real} and DHID: {dhid_real} " txt = f"Device placeholder with PHID: {phid_real} and DHID: {dhid_real} "
txt += f"bind successfully with device abstract PHID: {phid_abstract} DHID: {dhid_abstract}." txt += f"bind successfully with device snapshot PHID: {phid_abstract} DHID: {dhid_abstract}."
assert txt in body assert txt in body
# check new structure # check new structure