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 @@
...
@@ -17,7 +17,6 @@
# See COPYING file for full licensing terms.
# See COPYING file for full licensing terms.
# See https://www.nexedi.com/licensing for rationale and options.
# See https://www.nexedi.com/licensing for rationale and options.
#from six import StringIO
from
io
import
BytesIO
as
StringIO
from
io
import
BytesIO
as
StringIO
import
contextlib
import
contextlib
import
datetime
import
datetime
...
@@ -72,9 +71,7 @@ class KedifaMixin(object):
...
@@ -72,9 +71,7 @@ class KedifaMixin(object):
self
.
addCleanup
(
cleanTestDir
)
self
.
addCleanup
(
cleanTestDir
)
class
KedifaCaucaseMixin
(
KedifaMixin
):
class
KedifaMixinCaucase
(
KedifaMixin
):
# if six.PY2:
# assertRegex = unittest.TestCase.assertRegexpMatches
def
createKey
(
self
):
def
createKey
(
self
):
"""Generates a key and return a tuple containing the RSAPrivateKey
"""Generates a key and return a tuple containing the RSAPrivateKey
...
@@ -87,7 +84,7 @@ class KedifaCaucaseMixin(KedifaMixin):
...
@@ -87,7 +84,7 @@ class KedifaCaucaseMixin(KedifaMixin):
format
=
serialization
.
PrivateFormat
.
TraditionalOpenSSL
,
format
=
serialization
.
PrivateFormat
.
TraditionalOpenSSL
,
encryption_algorithm
=
serialization
.
NoEncryption
()
encryption_algorithm
=
serialization
.
NoEncryption
()
)
)
return
key
,
key_pem
#.decode('ascii')
return
key
,
key_pem
def
generateCSR
(
self
,
ip
):
def
generateCSR
(
self
,
ip
):
key_pem_file
=
os
.
path
.
join
(
self
.
testdir
,
'%s-key.pem'
%
(
ip
,))
key_pem_file
=
os
.
path
.
join
(
self
.
testdir
,
'%s-key.pem'
%
(
ip
,))
...
@@ -301,7 +298,7 @@ class KedifaCaucaseMixin(KedifaMixin):
...
@@ -301,7 +298,7 @@ class KedifaCaucaseMixin(KedifaMixin):
return
reserved_reference
return
reserved_reference
def
setUp
(
self
):
def
setUp
(
self
):
super
(
Kedifa
CaucaseMixin
,
self
).
setUp
()
super
(
Kedifa
MixinCaucase
,
self
).
setUp
()
self
.
createPem
()
self
.
createPem
()
self
.
setUpCaucase
()
self
.
setUpCaucase
()
...
@@ -317,7 +314,7 @@ class KedifaCaucaseMixin(KedifaMixin):
...
@@ -317,7 +314,7 @@ class KedifaCaucaseMixin(KedifaMixin):
def
requests_put
(
self
,
*
args
,
**
kwargs
):
def
requests_put
(
self
,
*
args
,
**
kwargs
):
return
requests
.
put
(
verify
=
self
.
ca_crt_pem
,
*
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
):
def
assertAnyLogEntry
(
self
,
entry
):
with
open
(
self
.
logfile
)
as
fh
:
with
open
(
self
.
logfile
)
as
fh
:
log_line_list
=
fh
.
readlines
()
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