Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MCORE_FS_1_2 to latest testplan #35097

Merged
merged 6 commits into from
Aug 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restyled by autopep8
  • Loading branch information
restyled-commits authored and tehampson committed Aug 20, 2024
commit 6f5bd85f9a553ba360b72c91dadab3d889610607
42 changes: 27 additions & 15 deletions src/python_testing/TC_MCORE_FS_1_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ def _generate_verifier(passcode: int, salt: bytes, iterations: int) -> bytes:

return w0.to_bytes(NIST256p.baselen, byteorder='big') + L.to_bytes('uncompressed')


@dataclass
class _SetupParamters:
setup_qr_code : str
manual_code :int
discriminator :int
passcode :int
setup_qr_code: str
manual_code: int
discriminator: int
passcode: int


class TC_MCORE_FS_1_2(MatterBaseTest):
Expand All @@ -79,7 +80,8 @@ def teardown_class(self):

async def _create_th_server(self, port):
# These are default testing values
setup_params = _SetupParamters(setup_qr_code="MT:-24J0AFN00KA0648G00", manual_code = 34970112332, discriminator = 3840, passcode = 20202021)
setup_params = _SetupParamters(setup_qr_code="MT:-24J0AFN00KA0648G00",
manual_code=34970112332, discriminator=3840, passcode=20202021)
kvs = f'kvs_{str(uuid.uuid4())}'

cmd = [self._th_server_app_path]
Expand Down Expand Up @@ -223,16 +225,26 @@ async def test_TC_MCORE_FS_1_2(self):
basic_info_attr = Clusters.BasicInformation.Attributes
bridged_device_info_attr = Clusters.BridgedDeviceBasicInformation.Attributes
Clusters.BasicInformation.Attributes
asserts.assert_equal(th_server_basic_info[basic_info_attr.VendorName], bridged_info_for_th_server[bridged_device_info_attr.VendorName], "VendorName incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.VendorID], bridged_info_for_th_server[bridged_device_info_attr.VendorID], "VendorID incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.ProductName], bridged_info_for_th_server[bridged_device_info_attr.ProductName], "ProductName incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.ProductID], bridged_info_for_th_server[bridged_device_info_attr.ProductID], "ProductID incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.NodeLabel], bridged_info_for_th_server[bridged_device_info_attr.NodeLabel], "NodeLabel incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.HardwareVersion], bridged_info_for_th_server[bridged_device_info_attr.HardwareVersion], "HardwareVersion incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.HardwareVersionString], bridged_info_for_th_server[bridged_device_info_attr.HardwareVersionString], "HardwareVersionString incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.SoftwareVersion], bridged_info_for_th_server[bridged_device_info_attr.SoftwareVersion], "SoftwareVersion incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.SoftwareVersionString], bridged_info_for_th_server[bridged_device_info_attr.SoftwareVersionString], "SoftwareVersionString incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.UniqueID], bridged_info_for_th_server[bridged_device_info_attr.UniqueID], "UniqueID incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.VendorName],
bridged_info_for_th_server[bridged_device_info_attr.VendorName], "VendorName incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.VendorID],
bridged_info_for_th_server[bridged_device_info_attr.VendorID], "VendorID incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.ProductName],
bridged_info_for_th_server[bridged_device_info_attr.ProductName], "ProductName incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.ProductID],
bridged_info_for_th_server[bridged_device_info_attr.ProductID], "ProductID incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.NodeLabel],
bridged_info_for_th_server[bridged_device_info_attr.NodeLabel], "NodeLabel incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.HardwareVersion],
bridged_info_for_th_server[bridged_device_info_attr.HardwareVersion], "HardwareVersion incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.HardwareVersionString],
bridged_info_for_th_server[bridged_device_info_attr.HardwareVersionString], "HardwareVersionString incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.SoftwareVersion],
bridged_info_for_th_server[bridged_device_info_attr.SoftwareVersion], "SoftwareVersion incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.SoftwareVersionString],
bridged_info_for_th_server[bridged_device_info_attr.SoftwareVersionString], "SoftwareVersionString incorrectly reported by DUT")
asserts.assert_equal(th_server_basic_info[basic_info_attr.UniqueID],
bridged_info_for_th_server[bridged_device_info_attr.UniqueID], "UniqueID incorrectly reported by DUT")


if __name__ == "__main__":
Expand Down