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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1412 additions
and
3 deletions
+1412
-3
circle/dashboard/fixtures/test-vm-fixture.json
+1405
-0
circle/dashboard/tests/test_vm.py
+7
-3
No files found.
circle/dashboard/fixtures/test-vm-fixture.json
0 → 100644
View file @
37909bfb
[
{
"pk"
:
1
,
"model"
:
"sites.site"
,
"fields"
:
{
"domain"
:
"example.com"
,
"name"
:
"example.com"
}
},
{
"pk"
:
1
,
"model"
:
"vm.lease"
,
"fields"
:
{
"suspend_interval_seconds"
:
18000
,
"name"
:
"lab"
,
"delete_interval_seconds"
:
180000
}
},
{
"pk"
:
1
,
"model"
:
"storage.datastore"
,
"fields"
:
{
"path"
:
"/disks"
,
"hostname"
:
"wut"
,
"name"
:
"diszkek"
}
},
{
"pk"
:
1
,
"model"
:
"storage.disk"
,
"fields"
:
{
"name"
:
"diszk"
,
"created"
:
"2013-09-16T09:05:56.926Z"
,
"modified"
:
"2013-09-19T09:10:25.117Z"
,
"filename"
:
"disc.img"
,
"destroyed"
:
null
,
"base"
:
null
,
"ready"
:
true
,
"datastore"
:
1
,
"dev_num"
:
"a"
,
"type"
:
"raw-rw"
,
"size"
:
8589934592
}
},
{
"pk"
:
1
,
"model"
:
"acl.level"
,
"fields"
:
{
"codename"
:
"owner"
,
"weight"
:
2
,
"name"
:
"owner"
,
"content_type"
:
15
}
},
{
"pk"
:
2
,
"model"
:
"acl.level"
,
"fields"
:
{
"codename"
:
"operator"
,
"weight"
:
1
,
"name"
:
"operator"
,
"content_type"
:
15
}
},
{
"pk"
:
3
,
"model"
:
"acl.level"
,
"fields"
:
{
"codename"
:
"user"
,
"weight"
:
0
,
"name"
:
"user"
,
"content_type"
:
15
}
},
{
"pk"
:
1
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_permission"
,
"name"
:
"Can add permission"
,
"content_type"
:
1
}
},
{
"pk"
:
2
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_permission"
,
"name"
:
"Can change permission"
,
"content_type"
:
1
}
},
{
"pk"
:
3
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_permission"
,
"name"
:
"Can delete permission"
,
"content_type"
:
1
}
},
{
"pk"
:
4
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_group"
,
"name"
:
"Can add group"
,
"content_type"
:
2
}
},
{
"pk"
:
5
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_group"
,
"name"
:
"Can change group"
,
"content_type"
:
2
}
},
{
"pk"
:
6
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_group"
,
"name"
:
"Can delete group"
,
"content_type"
:
2
}
},
{
"pk"
:
7
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_user"
,
"name"
:
"Can add user"
,
"content_type"
:
3
}
},
{
"pk"
:
8
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_user"
,
"name"
:
"Can change user"
,
"content_type"
:
3
}
},
{
"pk"
:
9
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_user"
,
"name"
:
"Can delete user"
,
"content_type"
:
3
}
},
{
"pk"
:
10
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_contenttype"
,
"name"
:
"Can add content type"
,
"content_type"
:
4
}
},
{
"pk"
:
11
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_contenttype"
,
"name"
:
"Can change content type"
,
"content_type"
:
4
}
},
{
"pk"
:
12
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_contenttype"
,
"name"
:
"Can delete content type"
,
"content_type"
:
4
}
},
{
"pk"
:
13
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_session"
,
"name"
:
"Can add session"
,
"content_type"
:
5
}
},
{
"pk"
:
14
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_session"
,
"name"
:
"Can change session"
,
"content_type"
:
5
}
},
{
"pk"
:
15
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_session"
,
"name"
:
"Can delete session"
,
"content_type"
:
5
}
},
{
"pk"
:
16
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_site"
,
"name"
:
"Can add site"
,
"content_type"
:
6
}
},
{
"pk"
:
17
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_site"
,
"name"
:
"Can change site"
,
"content_type"
:
6
}
},
{
"pk"
:
18
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_site"
,
"name"
:
"Can delete site"
,
"content_type"
:
6
}
},
{
"pk"
:
19
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_logentry"
,
"name"
:
"Can add log entry"
,
"content_type"
:
7
}
},
{
"pk"
:
20
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_logentry"
,
"name"
:
"Can change log entry"
,
"content_type"
:
7
}
},
{
"pk"
:
21
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_logentry"
,
"name"
:
"Can delete log entry"
,
"content_type"
:
7
}
},
{
"pk"
:
22
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_migrationhistory"
,
"name"
:
"Can add migration history"
,
"content_type"
:
8
}
},
{
"pk"
:
23
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_migrationhistory"
,
"name"
:
"Can change migration history"
,
"content_type"
:
8
}
},
{
"pk"
:
24
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_migrationhistory"
,
"name"
:
"Can delete migration history"
,
"content_type"
:
8
}
},
{
"pk"
:
25
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_namedbaseresourceconfig"
,
"name"
:
"Can add named base resource config"
,
"content_type"
:
9
}
},
{
"pk"
:
26
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_namedbaseresourceconfig"
,
"name"
:
"Can change named base resource config"
,
"content_type"
:
9
}
},
{
"pk"
:
27
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_namedbaseresourceconfig"
,
"name"
:
"Can delete named base resource config"
,
"content_type"
:
9
}
},
{
"pk"
:
28
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_node"
,
"name"
:
"Can add node"
,
"content_type"
:
10
}
},
{
"pk"
:
29
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_node"
,
"name"
:
"Can change node"
,
"content_type"
:
10
}
},
{
"pk"
:
30
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_node"
,
"name"
:
"Can delete node"
,
"content_type"
:
10
}
},
{
"pk"
:
31
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_nodeactivity"
,
"name"
:
"Can add node activity"
,
"content_type"
:
11
}
},
{
"pk"
:
32
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_nodeactivity"
,
"name"
:
"Can change node activity"
,
"content_type"
:
11
}
},
{
"pk"
:
33
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_nodeactivity"
,
"name"
:
"Can delete node activity"
,
"content_type"
:
11
}
},
{
"pk"
:
34
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_lease"
,
"name"
:
"Can add lease"
,
"content_type"
:
12
}
},
{
"pk"
:
35
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_lease"
,
"name"
:
"Can change lease"
,
"content_type"
:
12
}
},
{
"pk"
:
36
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_lease"
,
"name"
:
"Can delete lease"
,
"content_type"
:
12
}
},
{
"pk"
:
37
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_instancetemplate"
,
"name"
:
"Can add template"
,
"content_type"
:
13
}
},
{
"pk"
:
38
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_instancetemplate"
,
"name"
:
"Can change template"
,
"content_type"
:
13
}
},
{
"pk"
:
39
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_instancetemplate"
,
"name"
:
"Can delete template"
,
"content_type"
:
13
}
},
{
"pk"
:
40
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_interfacetemplate"
,
"name"
:
"Can add interface template"
,
"content_type"
:
14
}
},
{
"pk"
:
41
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_interfacetemplate"
,
"name"
:
"Can change interface template"
,
"content_type"
:
14
}
},
{
"pk"
:
42
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_interfacetemplate"
,
"name"
:
"Can delete interface template"
,
"content_type"
:
14
}
},
{
"pk"
:
43
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_instance"
,
"name"
:
"Can add instance"
,
"content_type"
:
15
}
},
{
"pk"
:
44
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_instance"
,
"name"
:
"Can change instance"
,
"content_type"
:
15
}
},
{
"pk"
:
45
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_instance"
,
"name"
:
"Can delete instance"
,
"content_type"
:
15
}
},
{
"pk"
:
46
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_instanceactivity"
,
"name"
:
"Can add instance activity"
,
"content_type"
:
16
}
},
{
"pk"
:
47
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_instanceactivity"
,
"name"
:
"Can change instance activity"
,
"content_type"
:
16
}
},
{
"pk"
:
48
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_instanceactivity"
,
"name"
:
"Can delete instance activity"
,
"content_type"
:
16
}
},
{
"pk"
:
49
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_interface"
,
"name"
:
"Can add interface"
,
"content_type"
:
17
}
},
{
"pk"
:
50
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_interface"
,
"name"
:
"Can change interface"
,
"content_type"
:
17
}
},
{
"pk"
:
51
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_interface"
,
"name"
:
"Can delete interface"
,
"content_type"
:
17
}
},
{
"pk"
:
52
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_datastore"
,
"name"
:
"Can add datastore"
,
"content_type"
:
18
}
},
{
"pk"
:
53
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_datastore"
,
"name"
:
"Can change datastore"
,
"content_type"
:
18
}
},
{
"pk"
:
54
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_datastore"
,
"name"
:
"Can delete datastore"
,
"content_type"
:
18
}
},
{
"pk"
:
55
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_disk"
,
"name"
:
"Can add disk"
,
"content_type"
:
19
}
},
{
"pk"
:
56
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_disk"
,
"name"
:
"Can change disk"
,
"content_type"
:
19
}
},
{
"pk"
:
57
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_disk"
,
"name"
:
"Can delete disk"
,
"content_type"
:
19
}
},
{
"pk"
:
58
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_rule"
,
"name"
:
"Can add rule"
,
"content_type"
:
20
}
},
{
"pk"
:
59
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_rule"
,
"name"
:
"Can change rule"
,
"content_type"
:
20
}
},
{
"pk"
:
60
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_rule"
,
"name"
:
"Can delete rule"
,
"content_type"
:
20
}
},
{
"pk"
:
61
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_vlan"
,
"name"
:
"Can add vlan"
,
"content_type"
:
21
}
},
{
"pk"
:
62
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_vlan"
,
"name"
:
"Can change vlan"
,
"content_type"
:
21
}
},
{
"pk"
:
63
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_vlan"
,
"name"
:
"Can delete vlan"
,
"content_type"
:
21
}
},
{
"pk"
:
64
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_vlangroup"
,
"name"
:
"Can add vlan group"
,
"content_type"
:
22
}
},
{
"pk"
:
65
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_vlangroup"
,
"name"
:
"Can change vlan group"
,
"content_type"
:
22
}
},
{
"pk"
:
66
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_vlangroup"
,
"name"
:
"Can delete vlan group"
,
"content_type"
:
22
}
},
{
"pk"
:
67
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_group"
,
"name"
:
"Can add group"
,
"content_type"
:
23
}
},
{
"pk"
:
68
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_group"
,
"name"
:
"Can change group"
,
"content_type"
:
23
}
},
{
"pk"
:
69
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_group"
,
"name"
:
"Can delete group"
,
"content_type"
:
23
}
},
{
"pk"
:
70
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_host"
,
"name"
:
"Can add host"
,
"content_type"
:
24
}
},
{
"pk"
:
71
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_host"
,
"name"
:
"Can change host"
,
"content_type"
:
24
}
},
{
"pk"
:
72
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_host"
,
"name"
:
"Can delete host"
,
"content_type"
:
24
}
},
{
"pk"
:
73
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_firewall"
,
"name"
:
"Can add firewall"
,
"content_type"
:
25
}
},
{
"pk"
:
74
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_firewall"
,
"name"
:
"Can change firewall"
,
"content_type"
:
25
}
},
{
"pk"
:
75
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_firewall"
,
"name"
:
"Can delete firewall"
,
"content_type"
:
25
}
},
{
"pk"
:
76
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_domain"
,
"name"
:
"Can add domain"
,
"content_type"
:
26
}
},
{
"pk"
:
77
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_domain"
,
"name"
:
"Can change domain"
,
"content_type"
:
26
}
},
{
"pk"
:
78
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_domain"
,
"name"
:
"Can delete domain"
,
"content_type"
:
26
}
},
{
"pk"
:
79
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_record"
,
"name"
:
"Can add record"
,
"content_type"
:
27
}
},
{
"pk"
:
80
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_record"
,
"name"
:
"Can change record"
,
"content_type"
:
27
}
},
{
"pk"
:
81
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_record"
,
"name"
:
"Can delete record"
,
"content_type"
:
27
}
},
{
"pk"
:
82
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_blacklist"
,
"name"
:
"Can add blacklist"
,
"content_type"
:
28
}
},
{
"pk"
:
83
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_blacklist"
,
"name"
:
"Can change blacklist"
,
"content_type"
:
28
}
},
{
"pk"
:
84
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_blacklist"
,
"name"
:
"Can delete blacklist"
,
"content_type"
:
28
}
},
{
"pk"
:
85
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_taskmeta"
,
"name"
:
"Can add task state"
,
"content_type"
:
29
}
},
{
"pk"
:
86
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_taskmeta"
,
"name"
:
"Can change task state"
,
"content_type"
:
29
}
},
{
"pk"
:
87
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_taskmeta"
,
"name"
:
"Can delete task state"
,
"content_type"
:
29
}
},
{
"pk"
:
88
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_tasksetmeta"
,
"name"
:
"Can add saved group result"
,
"content_type"
:
30
}
},
{
"pk"
:
89
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_tasksetmeta"
,
"name"
:
"Can change saved group result"
,
"content_type"
:
30
}
},
{
"pk"
:
90
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_tasksetmeta"
,
"name"
:
"Can delete saved group result"
,
"content_type"
:
30
}
},
{
"pk"
:
91
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_intervalschedule"
,
"name"
:
"Can add interval"
,
"content_type"
:
31
}
},
{
"pk"
:
92
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_intervalschedule"
,
"name"
:
"Can change interval"
,
"content_type"
:
31
}
},
{
"pk"
:
93
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_intervalschedule"
,
"name"
:
"Can delete interval"
,
"content_type"
:
31
}
},
{
"pk"
:
94
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_crontabschedule"
,
"name"
:
"Can add crontab"
,
"content_type"
:
32
}
},
{
"pk"
:
95
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_crontabschedule"
,
"name"
:
"Can change crontab"
,
"content_type"
:
32
}
},
{
"pk"
:
96
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_crontabschedule"
,
"name"
:
"Can delete crontab"
,
"content_type"
:
32
}
},
{
"pk"
:
97
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_periodictasks"
,
"name"
:
"Can add periodic tasks"
,
"content_type"
:
33
}
},
{
"pk"
:
98
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_periodictasks"
,
"name"
:
"Can change periodic tasks"
,
"content_type"
:
33
}
},
{
"pk"
:
99
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_periodictasks"
,
"name"
:
"Can delete periodic tasks"
,
"content_type"
:
33
}
},
{
"pk"
:
100
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_periodictask"
,
"name"
:
"Can add periodic task"
,
"content_type"
:
34
}
},
{
"pk"
:
101
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_periodictask"
,
"name"
:
"Can change periodic task"
,
"content_type"
:
34
}
},
{
"pk"
:
102
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_periodictask"
,
"name"
:
"Can delete periodic task"
,
"content_type"
:
34
}
},
{
"pk"
:
103
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_workerstate"
,
"name"
:
"Can add worker"
,
"content_type"
:
35
}
},
{
"pk"
:
104
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_workerstate"
,
"name"
:
"Can change worker"
,
"content_type"
:
35
}
},
{
"pk"
:
105
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_workerstate"
,
"name"
:
"Can delete worker"
,
"content_type"
:
35
}
},
{
"pk"
:
106
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_taskstate"
,
"name"
:
"Can add task"
,
"content_type"
:
36
}
},
{
"pk"
:
107
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_taskstate"
,
"name"
:
"Can change task"
,
"content_type"
:
36
}
},
{
"pk"
:
108
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_taskstate"
,
"name"
:
"Can delete task"
,
"content_type"
:
36
}
},
{
"pk"
:
109
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_userobjectpermission"
,
"name"
:
"Can add user object permission"
,
"content_type"
:
37
}
},
{
"pk"
:
110
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_userobjectpermission"
,
"name"
:
"Can change user object permission"
,
"content_type"
:
37
}
},
{
"pk"
:
111
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_userobjectpermission"
,
"name"
:
"Can delete user object permission"
,
"content_type"
:
37
}
},
{
"pk"
:
112
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_groupobjectpermission"
,
"name"
:
"Can add group object permission"
,
"content_type"
:
38
}
},
{
"pk"
:
113
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_groupobjectpermission"
,
"name"
:
"Can change group object permission"
,
"content_type"
:
38
}
},
{
"pk"
:
114
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_groupobjectpermission"
,
"name"
:
"Can delete group object permission"
,
"content_type"
:
38
}
},
{
"pk"
:
115
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"own_instance"
,
"name"
:
"owner"
,
"content_type"
:
15
}
},
{
"pk"
:
116
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"operate_instance"
,
"name"
:
"operator"
,
"content_type"
:
15
}
},
{
"pk"
:
117
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"use_instance"
,
"name"
:
"user"
,
"content_type"
:
15
}
},
{
"pk"
:
118
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_diskactivity"
,
"name"
:
"Can add disk activity"
,
"content_type"
:
39
}
},
{
"pk"
:
119
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_diskactivity"
,
"name"
:
"Can change disk activity"
,
"content_type"
:
39
}
},
{
"pk"
:
120
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_diskactivity"
,
"name"
:
"Can delete disk activity"
,
"content_type"
:
39
}
},
{
"pk"
:
121
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_level"
,
"name"
:
"Can add level"
,
"content_type"
:
40
}
},
{
"pk"
:
122
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_level"
,
"name"
:
"Can change level"
,
"content_type"
:
40
}
},
{
"pk"
:
123
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_level"
,
"name"
:
"Can delete level"
,
"content_type"
:
40
}
},
{
"pk"
:
127
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_objectlevel"
,
"name"
:
"Can add object level"
,
"content_type"
:
42
}
},
{
"pk"
:
128
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_objectlevel"
,
"name"
:
"Can change object level"
,
"content_type"
:
42
}
},
{
"pk"
:
129
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_objectlevel"
,
"name"
:
"Can delete object level"
,
"content_type"
:
42
}
},
{
"pk"
:
130
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_switchport"
,
"name"
:
"Can add switch port"
,
"content_type"
:
43
}
},
{
"pk"
:
131
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_switchport"
,
"name"
:
"Can change switch port"
,
"content_type"
:
43
}
},
{
"pk"
:
132
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_switchport"
,
"name"
:
"Can delete switch port"
,
"content_type"
:
43
}
},
{
"pk"
:
133
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"add_ethernetdevice"
,
"name"
:
"Can add ethernet device"
,
"content_type"
:
44
}
},
{
"pk"
:
134
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"change_ethernetdevice"
,
"name"
:
"Can change ethernet device"
,
"content_type"
:
44
}
},
{
"pk"
:
135
,
"model"
:
"auth.permission"
,
"fields"
:
{
"codename"
:
"delete_ethernetdevice"
,
"name"
:
"Can delete ethernet device"
,
"content_type"
:
44
}
},
{
"pk"
:
1
,
"model"
:
"auth.group"
,
"fields"
:
{
"name"
:
"csopi"
,
"permissions"
:
[]
}
},
{
"pk"
:
2
,
"model"
:
"auth.group"
,
"fields"
:
{
"name"
:
"akkorszia"
,
"permissions"
:
[]
}
},
{
"pk"
:
3
,
"model"
:
"auth.group"
,
"fields"
:
{
"name"
:
"akkountsoherek"
,
"permissions"
:
[]
}
},
{
"pk"
:
4
,
"model"
:
"auth.group"
,
"fields"
:
{
"name"
:
"helog"
,
"permissions"
:
[]
}
},
{
"pk"
:
-1
,
"model"
:
"auth.user"
,
"fields"
:
{
"username"
:
"AnonymousUser"
,
"first_name"
:
""
,
"last_name"
:
""
,
"is_active"
:
true
,
"is_superuser"
:
false
,
"is_staff"
:
false
,
"last_login"
:
"2013-09-30T12:37:38.484Z"
,
"groups"
:
[],
"user_permissions"
:
[],
"password"
:
""
,
"email"
:
""
,
"date_joined"
:
"2013-09-30T12:37:38.484Z"
}
},
{
"pk"
:
1
,
"model"
:
"auth.user"
,
"fields"
:
{
"username"
:
"test"
,
"first_name"
:
""
,
"last_name"
:
""
,
"is_active"
:
true
,
"is_superuser"
:
true
,
"is_staff"
:
true
,
"last_login"
:
"2013-11-09T03:40:23.157Z"
,
"groups"
:
[],
"user_permissions"
:
[
115
],
"password"
:
"pbkdf2_sha256$10000$KIoeMs78MiOj$PnVXn3YJMehbOciBO32CMzqL0ZnQrzrdb7+b5dE13os="
,
"email"
:
"test@example.org"
,
"date_joined"
:
"2013-09-04T15:29:49.914Z"
}
},
{
"pk"
:
3
,
"model"
:
"auth.user"
,
"fields"
:
{
"username"
:
"proba"
,
"first_name"
:
""
,
"last_name"
:
""
,
"is_active"
:
true
,
"is_superuser"
:
false
,
"is_staff"
:
false
,
"last_login"
:
"2013-10-14T06:59:48Z"
,
"groups"
:
[
1
],
"user_permissions"
:
[],
"password"
:
""
,
"email"
:
""
,
"date_joined"
:
"2013-10-14T06:59:48Z"
}
},
{
"pk"
:
4
,
"model"
:
"auth.user"
,
"fields"
:
{
"username"
:
"helo"
,
"first_name"
:
""
,
"last_name"
:
""
,
"is_active"
:
true
,
"is_superuser"
:
false
,
"is_staff"
:
false
,
"last_login"
:
"2013-11-09T01:11:41.534Z"
,
"groups"
:
[
4
],
"user_permissions"
:
[],
"password"
:
""
,
"email"
:
""
,
"date_joined"
:
"2013-11-09T01:11:41.534Z"
}
},
{
"pk"
:
1
,
"model"
:
"vm.instance"
,
"fields"
:
{
"destoryed"
:
null
,
"disks"
:
[
1
],
"boot_menu"
:
false
,
"owner"
:
1
,
"time_of_delete"
:
null
,
"max_ram_size"
:
200
,
"pw"
:
"ads"
,
"time_of_suspend"
:
null
,
"ram_size"
:
200
,
"priority"
:
4
,
"active_since"
:
null
,
"state"
:
"NOSTATE"
,
"template"
:
null
,
"access_method"
:
"nx"
,
"lease"
:
1
,
"node"
:
null
,
"description"
:
""
,
"arch"
:
"x86_64"
,
"name"
:
"vanneve"
,
"created"
:
"2013-09-16T09:05:59.991Z"
,
"raw_data"
:
""
,
"vnc_port"
:
1234
,
"num_cores"
:
2
,
"modified"
:
"2013-10-14T07:27:38.192Z"
}
}
]
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