Esempio n. 1
0
def test_decode():
    # Arrange
    version = Osversion()
    data = {"version_file": "test"}

    # Act
    version.decode(data)

    # Assert
    assert version.version_file == "test"
Esempio n. 2
0
    def decode(self, data: dict):
        """
        Decodes the received data. Decoding of each single version is done by the corresponding decode method in
        :class:`Osversion`.

        :param data: The data to decode.
        """
        for key in data.keys():
            version = Osversion()
            version.decode(data.get(key))
            self.osversion_add(key, version)
 def decode(self, data):
     for k, v in data:
         version = Osversion()
         version.decode(v)
         self.osversion_add(k, version)