Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kedifa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurel
kedifa
Commits
98c549e5
Commit
98c549e5
authored
Nov 04, 2020
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
naming update
parent
8c6557e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
kedifa/test.py
kedifa/test.py
+4
-7
No files found.
kedifa/test
_kedifa
.py
→
kedifa/test.py
View file @
98c549e5
...
...
@@ -17,7 +17,6 @@
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
#from six import StringIO
from
io
import
BytesIO
as
StringIO
import
contextlib
import
datetime
...
...
@@ -72,9 +71,7 @@ class KedifaMixin(object):
self
.
addCleanup
(
cleanTestDir
)
class
KedifaCaucaseMixin
(
KedifaMixin
):
# if six.PY2:
# assertRegex = unittest.TestCase.assertRegexpMatches
class
KedifaMixinCaucase
(
KedifaMixin
):
def
createKey
(
self
):
"""Generates a key and return a tuple containing the RSAPrivateKey
...
...
@@ -87,7 +84,7 @@ class KedifaCaucaseMixin(KedifaMixin):
format
=
serialization
.
PrivateFormat
.
TraditionalOpenSSL
,
encryption_algorithm
=
serialization
.
NoEncryption
()
)
return
key
,
key_pem
#.decode('ascii')
return
key
,
key_pem
def
generateCSR
(
self
,
ip
):
key_pem_file
=
os
.
path
.
join
(
self
.
testdir
,
'%s-key.pem'
%
(
ip
,))
...
...
@@ -301,7 +298,7 @@ class KedifaCaucaseMixin(KedifaMixin):
return
reserved_reference
def
setUp
(
self
):
super
(
Kedifa
CaucaseMixin
,
self
).
setUp
()
super
(
Kedifa
MixinCaucase
,
self
).
setUp
()
self
.
createPem
()
self
.
setUpCaucase
()
...
...
@@ -317,7 +314,7 @@ class KedifaCaucaseMixin(KedifaMixin):
def
requests_put
(
self
,
*
args
,
**
kwargs
):
return
requests
.
put
(
verify
=
self
.
ca_crt_pem
,
*
args
,
**
kwargs
)
class
KedifaIntegrationTest
(
Kedifa
CaucaseMixin
,
unittest
.
TestCase
):
class
KedifaIntegrationTest
(
Kedifa
MixinCaucase
,
unittest
.
TestCase
):
def
assertAnyLogEntry
(
self
,
entry
):
with
open
(
self
.
logfile
)
as
fh
:
log_line_list
=
fh
.
readlines
()
...
...
Write
Preview
Markdown
is supported
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