Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
37909bfb
authored
Nov 11, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: test vm_detail with fixture
parent
045396f9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
circle/dashboard/fixtures/test-vm-fixture.json
+0
-0
circle/dashboard/tests/test_vm.py
+7
-3
No files found.
circle/dashboard/fixtures/test-vm-fixture.json
0 → 100644
View file @
37909bfb
This diff is collapsed.
Click to expand it.
circle/dashboard/tests/test_vm.py
View file @
37909bfb
...
@@ -2,11 +2,10 @@ from django.test import TestCase
...
@@ -2,11 +2,10 @@ from django.test import TestCase
from
django.test.client
import
Client
from
django.test.client
import
Client
from
django.contrib.auth.models
import
User
,
Group
from
django.contrib.auth.models
import
User
,
Group
from
vm.models
import
Instance
class
VmDetailTest
(
TestCase
):
class
VmDetailTest
(
TestCase
):
fixtures
=
[
'test-vm-fixture.json'
]
def
setUp
(
self
):
def
setUp
(
self
):
self
.
u1
=
User
.
objects
.
create
(
username
=
'user1'
)
self
.
u1
=
User
.
objects
.
create
(
username
=
'user1'
)
self
.
u2
=
User
.
objects
.
create
(
username
=
'user2'
,
is_staff
=
True
)
self
.
u2
=
User
.
objects
.
create
(
username
=
'user2'
,
is_staff
=
True
)
...
@@ -20,3 +19,8 @@ class VmDetailTest(TestCase):
...
@@ -20,3 +19,8 @@ class VmDetailTest(TestCase):
c
=
Client
()
c
=
Client
()
response
=
c
.
get
(
'/dashboard/vm/235555/'
)
response
=
c
.
get
(
'/dashboard/vm/235555/'
)
self
.
assertEqual
(
response
.
status_code
,
404
)
self
.
assertEqual
(
response
.
status_code
,
404
)
def
test_vm_page
(
self
):
c
=
Client
()
response
=
c
.
get
(
'/dashboard/vm/1/'
)
self
.
assertEqual
(
response
.
status_code
,
200
)
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