mirror of
https://github.com/thegeeklab/corenetworks.git
synced 2024-11-22 07:20:39 +00:00
use assert_called_once_with test method
This commit is contained in:
parent
e7784556d5
commit
bd6d5fee19
@ -137,7 +137,7 @@ def test_add_record(requests_mock, client, mocker):
|
|||||||
mocker.patch.object(client, "commit")
|
mocker.patch.object(client, "commit")
|
||||||
client.auto_commit = True
|
client.auto_commit = True
|
||||||
client.add_record(zone="example.com", params=record)
|
client.add_record(zone="example.com", params=record)
|
||||||
client.commit.assert_called()
|
client.commit.assert_called_once_with(zone="example.com")
|
||||||
|
|
||||||
|
|
||||||
def test_delete_record(requests_mock, client, mocker):
|
def test_delete_record(requests_mock, client, mocker):
|
||||||
@ -161,7 +161,7 @@ def test_delete_record(requests_mock, client, mocker):
|
|||||||
client.delete_record(zone="example.com", params={
|
client.delete_record(zone="example.com", params={
|
||||||
"type": "A",
|
"type": "A",
|
||||||
})
|
})
|
||||||
client.commit.assert_called()
|
client.commit.assert_called_once_with(zone="example.com")
|
||||||
|
|
||||||
|
|
||||||
def test_delete_record_invalid(requests_mock, client):
|
def test_delete_record_invalid(requests_mock, client):
|
||||||
|
Loading…
Reference in New Issue
Block a user