Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.core
Commits
4c1d31d2
Commit
4c1d31d2
authored
Jun 06, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add slapobject mockups
parent
854ac7d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
slapos/tests/slapobject.py
slapos/tests/slapobject.py
+19
-0
No files found.
slapos/tests/slapobject.py
View file @
4c1d31d2
...
@@ -37,6 +37,25 @@ from slapos.grid import networkcache
...
@@ -37,6 +37,25 @@ from slapos.grid import networkcache
# XXX: BasicMixin should be in a separated module, not in slapgrid test module.
# XXX: BasicMixin should be in a separated module, not in slapgrid test module.
from
slapos.tests.slapgrid
import
BasicMixin
from
slapos.tests.slapgrid
import
BasicMixin
# Mockup
# XXX: Ambiguous name
# XXX: Factor with common SlapOS tests
class
FakeCallAndStore
(
object
):
"""
Used to check if the mocked method has been called.
"""
def
__init__
(
self
):
self
.
called
=
False
def
__call__
(
self
,
*
args
,
**
kwargs
):
self
.
called
=
True
class
FakeCallAndNoop
(
object
):
"""
Used to no-op a method.
"""
def
__call__
(
self
,
*
args
,
**
kwargs
):
pass
# XXX: change name and behavior to be more generic and factor with other tests
# XXX: change name and behavior to be more generic and factor with other tests
class
FakeNetworkCacheCallAndRead
(
object
):
class
FakeNetworkCacheCallAndRead
(
object
):
...
...
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