Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
monkeysphere
monkeysign
Commits
4fb856f5
Unverified
Commit
4fb856f5
authored
Jun 18, 2018
by
anarcat
Browse files
update key to avoid skipping too many tests
parent
2c9c9ff3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
monkeysign/tests/files/7B75921E.asc
View file @
4fb856f5
This diff is collapsed.
Click to expand it.
monkeysign/tests/test_gpg.py
View file @
4fb856f5
...
...
@@ -216,14 +216,14 @@ class TestKeyringWithKeys(TestKeyringBase):
with
self
.
assertRaises
(
GpgRuntimeError
):
self
.
gpg
.
sign_key
(
'7B75921E'
,
True
)
@
skipIfDatePassed
(
'201
7
-06-0
1
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-06-0
5
T00:00:00UTC'
)
def
test_sign_key_all_uids
(
self
):
"""test signature of all uids of a key"""
self
.
assertTrue
(
self
.
gpg
.
sign_key
(
'7B75921E'
,
True
))
self
.
gpg
.
context
.
call_command
([
'list-sigs'
,
'7B75921E'
])
self
.
assertRegexpMatches
(
self
.
gpg
.
context
.
stdout
,
'sig:::1:86E4E70A96F47C6A:[^:]*::::Second Test Key <unittests@monkeysphere.info>:10x:'
)
@
skipIfDatePassed
(
'201
7
-06-0
1
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-06-0
5
T00:00:00UTC'
)
def
test_sign_key_single_uid
(
self
):
"""test signing a key with a single uid"""
self
.
assertTrue
(
self
.
gpg
.
import_data
(
open
(
find_test_file
(
'323F39BD.asc'
)).
read
()))
...
...
@@ -232,21 +232,21 @@ class TestKeyringWithKeys(TestKeyringBase):
self
.
assertRegexpMatches
(
self
.
gpg
.
context
.
stdout
,
'sig:::1:A31E75E4323F39BD:[^:]*::::Monkeysphere second test key <bar@example.com>:[0-9]*x:'
)
@
skipUnlessUnicodeLocale
()
@
skipIfDatePassed
(
'201
7
-06-0
1
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-06-0
5
T00:00:00UTC'
)
def
test_sign_key_one_uid
(
self
):
"""test signature of a single uid"""
self
.
assertTrue
(
self
.
gpg
.
sign_key
(
'Antoine Beaupré <anarcat@debian.org>'
))
self
.
gpg
.
context
.
call_command
([
'list-sigs'
,
'7B75921E'
])
self
.
assertRegexpMatches
(
self
.
gpg
.
context
.
stdout
,
'sig:::1:86E4E70A96F47C6A:[^:]*::::Second Test Key <unittests@monkeysphere.info>:10x:'
)
@
skipIfDatePassed
(
'201
7
-06-0
1
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-06-0
5
T00:00:00UTC'
)
def
test_sign_key_as_user
(
self
):
"""normal signature with a signing user specified"""
self
.
gpg
.
context
.
set_option
(
'local-user'
,
'96F47C6A'
)
self
.
assertTrue
(
self
.
gpg
.
sign_key
(
'7B75921E'
,
True
))
@
skipUnlessUnicodeLocale
()
@
skipIfDatePassed
(
'201
7
-06-0
1
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-06-0
5
T00:00:00UTC'
)
def
test_sign_already_signed
(
self
):
"""test if signing a already signed key fails with a meaningful message"""
self
.
assertTrue
(
self
.
gpg
.
sign_key
(
'Antoine Beaupré <anarcat@debian.org>'
))
...
...
monkeysign/tests/test_ui.py
View file @
4fb856f5
...
...
@@ -202,7 +202,7 @@ class CliTestCase(CliBaseTest):
self
.
assertTrue
(
args
.
local
)
@
skipIfDatePassed
(
'201
8
-0
4-19
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-0
6-05
T00:00:00UTC'
)
class
CliTestDialog
(
CliBaseTest
):
def
setUp
(
self
):
CliBaseTest
.
setUp
(
self
)
...
...
@@ -239,7 +239,7 @@ this tests for bug #716675"""
self
.
write_to_callback
(
"
\n\n
"
,
callback
)
# say 'default' twice
@
skipIfDatePassed
(
'201
8
-0
4-19
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-0
6-05
T00:00:00UTC'
)
class
CliTestSpacedFingerprint
(
CliTestDialog
):
def
setUp
(
self
):
CliTestDialog
.
setUp
(
self
)
...
...
@@ -274,7 +274,7 @@ class BasicTests(BaseTestCase):
self
.
assertFalse
(
os
.
path
.
exists
(
self
.
homedir
))
@
skipIfDatePassed
(
'201
8
-0
4-19
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-0
6-05
T00:00:00UTC'
)
class
SigningTests
(
BaseTestCase
):
pattern
=
'7B75921E'
...
...
@@ -493,7 +493,7 @@ this duplicates tests from the gpg code, but is necessary to test later function
os
.
unlink
(
outputfile
)
@
skipIfDatePassed
(
'201
8
-0
4-19
T00:00:00UTC'
)
@
skipIfDatePassed
(
'201
9
-0
6-05
T00:00:00UTC'
)
class
EmailFactoryTest
(
BaseTestCase
):
pattern
=
'7B75921E'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment