Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
221d4766
authored
Apr 02, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: more generic operation tests
parent
af914608
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
circle/vm/tests/test_operations.py
+12
-11
No files found.
circle/vm/tests/test_operations.py
View file @
221d4766
from
django.test
import
TestCase
from
common.operations
import
operation_registry_name
as
op_reg_name
from
vm.models
import
Instance
from
vm.operations
import
(
DeployOperation
,
DestroyOperation
,
MigrateOperation
,
...
...
@@ -11,54 +12,54 @@ from vm.operations import (
class
DeployOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
DeployOperation
.
id
in
Instance
.
_ops
assert
DeployOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
DestroyOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
DestroyOperation
.
id
in
Instance
.
_ops
assert
DestroyOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
MigrateOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
MigrateOperation
.
id
in
Instance
.
_ops
assert
MigrateOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
RebootOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
RebootOperation
.
id
in
Instance
.
_ops
assert
RebootOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
RedeployOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
RedeployOperation
.
id
in
Instance
.
_ops
assert
RedeployOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
ResetOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
ResetOperation
.
id
in
Instance
.
_ops
assert
ResetOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
SaveAsTemplateOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
SaveAsTemplateOperation
.
id
in
Instance
.
_ops
assert
SaveAsTemplateOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
ShutdownOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
ShutdownOperation
.
id
in
Instance
.
_ops
assert
ShutdownOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
ShutOffOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
ShutOffOperation
.
id
in
Instance
.
_ops
assert
ShutOffOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
SleepOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
SleepOperation
.
id
in
Instance
.
_ops
assert
SleepOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
class
WakeUpOperationTestCase
(
TestCase
):
def
test_operation_registered
(
self
):
assert
WakeUpOperation
.
id
in
Instance
.
_ops
assert
WakeUpOperation
.
id
in
getattr
(
Instance
,
op_reg_name
)
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