a019f076c036e1405d7a0d605c7c182bea4015da,tests/components/subaru/test_config_flow.py,,test_pin_form_success,#Any#Any#,152
Before Change
async def test_pin_form_success(hass, pin_form):
Test successful PIN entry.
with patch(MOCK_API_TEST_PIN, return_value=True,) as mock_test_pin, patch(
MOCK_API_UPDATE_SAVED_PIN,
return_value=True,
) as mock_update_saved_pin:
result = await hass.config_entries.flow.async_configure(
pin_form["flow_id"], user_input={CONF_PIN: TEST_PIN}
)
assert len(mock_test_pin.mock_calls) == 1
assert len(mock_update_saved_pin.mock_calls) == 1
expected = {
"title": TEST_USERNAME,
After Change
async def test_pin_form_success(hass, pin_form):
Test successful PIN entry.
with patch(MOCK_API_TEST_PIN, return_value=True,) as mock_test_pin, patch(
MOCK_API_UPDATE_SAVED_PIN,
return_value=True,
) as mock_update_saved_pin, patch(
ASYNC_SETUP, return_value=True
) as mock_setup, patch(
ASYNC_SETUP_ENTRY, return_value=True
) as mock_setup_entry:
result = await hass.config_entries.flow.async_configure(
pin_form["flow_id"], user_input={CONF_PIN: TEST_PIN}
)
assert len(mock_test_pin.mock_calls) == 1
assert len(mock_update_saved_pin.mock_calls) == 1
assert len(mock_setup.mock_calls) == 1
assert len(mock_setup_entry.mock_calls) == 1
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: home-assistant/home-assistant
Commit Name: a019f076c036e1405d7a0d605c7c182bea4015da
Time: 2021-03-25
Author: 7310260+G-Two@users.noreply.github.com
File Name: tests/components/subaru/test_config_flow.py
Class Name:
Method Name: test_pin_form_success
Project Name: home-assistant/home-assistant
Commit Name: 4dda842b16646b9f3863366a279d4dc65f262ece
Time: 2018-01-09
Author: andrea.campi@gmail.com
File Name: tests/components/light/test_hue.py
Class Name: TestSetup
Method Name: test_update_lights_with_no_lights
Project Name: polyaxon/polyaxon
Commit Name: 8aac626ed379e0c45772ec463c8238990896b9e9
Time: 2018-12-11
Author: mouradmourafiq@gmail.com
File Name: tests/test_experiment_groups/test_views.py
Class Name: TestStopExperimentGroupViewV1
Method Name: test_stop_all