Compare commits
No commits in common. "c8s" and "c8-beta" have entirely different histories.
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,4 +1 @@
|
||||
/netifaces-0.5.tar.gz
|
||||
/netifaces-0.10.4.tar.gz
|
||||
/netifaces-0.10.5.tar.gz
|
||||
/netifaces-0.10.6.tar.gz
|
||||
SOURCES/netifaces-0.10.6.tar.gz
|
||||
|
1
.python-netifaces.metadata
Normal file
1
.python-netifaces.metadata
Normal file
@ -0,0 +1 @@
|
||||
e318ebb83b9eba92e168cba2d9d7251b21bceb85 SOURCES/netifaces-0.10.6.tar.gz
|
@ -1,6 +0,0 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-8
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
1
sources
1
sources
@ -1 +0,0 @@
|
||||
SHA512 (netifaces-0.10.6.tar.gz) = 2c892062286007a8330c2cddc148ea21d1fd24aec32b5f25b8fe905933c651f8c532596f523f0bb7edb3a143e9a491ec49d60f75efad4407273ac2647b579b1e
|
@ -1,30 +0,0 @@
|
||||
import netifaces
|
||||
import pytest
|
||||
|
||||
|
||||
def test_interfaces():
|
||||
ifaces = netifaces.interfaces()
|
||||
assert isinstance(ifaces, list)
|
||||
assert "lo" in ifaces
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"iface,af,expected",
|
||||
[
|
||||
("lo", netifaces.AF_INET, "127.0.0.1"),
|
||||
("lo", netifaces.AF_INET6, "::1"),
|
||||
],
|
||||
)
|
||||
def test_ifaddresses_lo(iface, af, expected):
|
||||
addrs = netifaces.ifaddresses(iface)
|
||||
assert addrs[af][0]["addr"] == expected
|
||||
|
||||
|
||||
def test_invalid():
|
||||
with pytest.raises(ValueError):
|
||||
netifaces.ifaddresses("invalid interface")
|
||||
|
||||
|
||||
def test_gateways():
|
||||
gw = netifaces.gateways()
|
||||
assert "default" in gw
|
@ -1,13 +0,0 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
tags:
|
||||
- classic
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
required_packages:
|
||||
- python3-netifaces
|
||||
- python3-pytest
|
||||
tests:
|
||||
- unittests:
|
||||
dir: "."
|
||||
run: pytest-3 test_netifaces.py
|
Loading…
Reference in New Issue
Block a user