Skip to content

MacAddress objects are not being provided in UnitTests #184

Open
@MichaelWasher

Description

@MichaelWasher

MacAddress objects are used to represent both the src_mac and port_id of packets in some functions. MacAddress objects should be used to represent mac values at all times, but due to Pythons use of duck-typing this has slipped through.

An example of this is here:
https://github.com/faucetsdn/chewie/blob/master/test/unit/test_chewie.py#L292-L299
https://github.com/faucetsdn/chewie/blob/master/test/unit/test_chewie_mocks.py#L47

The documentation of Chewie claims MacAddress is expected and is assumed below port_up() / port_down() functions.

Change the tests provide the correct object type and clean the use of mac address.
There should be no need for the use of str(port_id) as the __str__ function should be called internally in the log/print functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions