-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: Mark module with darwin instead of functions.
- Loading branch information
Showing
6 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pytest | ||
|
||
from rpcclient.exceptions import ArgumentError | ||
|
||
|
||
def test_peek(client): | ||
""" | ||
:param rpcclient.client.Client client: | ||
""" | ||
with client.safe_malloc(0x100) as peekable: | ||
client.peek(peekable, 0x100) | ||
|
||
|
||
def test_peek_invalid_address(client): | ||
""" | ||
:param rpcclient.client.Client client: | ||
""" | ||
with pytest.raises(ArgumentError): | ||
client.peek(0, 0x10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
import pytest | ||
|
||
pytestmark = pytest.mark.darwin | ||
|
||
|
||
@pytest.mark.parametrize('data', [ | ||
None, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import pytest | ||
|
||
pytestmark = pytest.mark.darwin | ||
|
||
|
||
def test_modules(client): | ||
""" | ||
:param rpcclient.client.Client client: | ||
""" | ||
assert '/usr/lib/libSystem.B.dylib' in client.modules | ||
|
||
|
||
def test_uname(client): | ||
""" | ||
:param rpcclient.client.Client client: | ||
""" | ||
assert client.uname.sysname == 'Darwin' | ||
assert 'machine' in client.uname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters