Skip to content

Commit 5a4d51e

Browse files
authored
Mark config-flow-test-coverage as done in SFR Box IQS (home-assistant#157485)
1 parent 9e1bc63 commit 5a4d51e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

homeassistant/components/sfr_box/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"documentation": "https://www.home-assistant.io/integrations/sfr_box",
77
"integration_type": "device",
88
"iot_class": "local_polling",
9+
"quality_scale": "bronze",
910
"requirements": ["sfrbox-api==0.1.0"]
1011
}

homeassistant/components/sfr_box/quality_scale.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ rules:
33
config-flow: done
44
test-before-configure: done
55
unique-config-entry: done
6-
config-flow-test-coverage:
7-
status: todo
8-
comment: We should test created mac address
6+
config-flow-test-coverage: done
97
runtime-data: done
108
test-before-setup: done
119
appropriate-polling: done

script/hassfest/quality_scale.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1879,7 +1879,6 @@ class Rule:
18791879
"sesame",
18801880
"seven_segments",
18811881
"seventeentrack",
1882-
"sfr_box",
18831882
"sharkiq",
18841883
"shell_command",
18851884
"shodan",

tests/components/sfr_box/test_config_flow.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ async def test_config_flow_skip_auth(
5656
assert result["type"] is FlowResultType.CREATE_ENTRY
5757
assert result["title"] == "SFR Box"
5858
assert result["data"] == {CONF_HOST: "192.168.0.1"}
59+
assert result["context"]["unique_id"] == "e4:5d:51:00:11:22"
5960

6061
assert len(mock_setup_entry.mock_calls) == 1
6162

@@ -112,6 +113,7 @@ async def test_config_flow_skip_auth_failure(
112113
assert result["type"] is FlowResultType.CREATE_ENTRY
113114
assert result["title"] == "SFR Box"
114115
assert result["data"] == {CONF_HOST: "192.168.0.1"}
116+
assert result["context"]["unique_id"] == "e4:5d:51:00:11:22"
115117

116118
assert len(mock_setup_entry.mock_calls) == 1
117119

@@ -167,6 +169,7 @@ async def test_config_flow_with_auth(
167169
CONF_USERNAME: "admin",
168170
CONF_PASSWORD: "valid",
169171
}
172+
assert result["context"]["unique_id"] == "e4:5d:51:00:11:22"
170173

171174
assert len(mock_setup_entry.mock_calls) == 1
172175

@@ -237,6 +240,7 @@ async def test_config_flow_with_auth_failure(
237240
CONF_USERNAME: "admin",
238241
CONF_PASSWORD: "valid",
239242
}
243+
assert result["context"]["unique_id"] == "e4:5d:51:00:11:22"
240244

241245
assert len(mock_setup_entry.mock_calls) == 1
242246

0 commit comments

Comments
 (0)