Skip to content

Commit 3aef4aa

Browse files
committed
Added unit tests for Resource model
1 parent 44fdab1 commit 3aef4aa

File tree

4 files changed

+1049
-0
lines changed

4 files changed

+1049
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
HTTP/1.1 200 OK
2+
Content-Type: application/json; charset=UTF-8
3+
4+
5+
{
6+
"created_by_user_id":"ad6540c351de48d0825aa8f618b2eb2a",
7+
"name":"storage.objects.outgoing.bytes",
8+
"resource_id":"0b21463f-404e-5156-898e-a75753138ad1",
9+
"created_by_project_id":"a652c6a9566149dd9c38ad23c00f1cd7",
10+
"archive_policy":{
11+
"definition":[
12+
{
13+
"points":12,
14+
"timespan":"1:00:00",
15+
"granularity":"0:05:00"
16+
},
17+
{
18+
"points":24,
19+
"timespan":"1 day, 0:00:00",
20+
"granularity":"1:00:00"
21+
},
22+
{
23+
"points":30,
24+
"timespan":"30 days, 0:00:00",
25+
"granularity":"1 day, 0:00:00"
26+
}
27+
],
28+
"back_window":0,
29+
"name":"low",
30+
"aggregation_methods":[
31+
"std",
32+
"count",
33+
"95pct",
34+
"min",
35+
"max",
36+
"sum",
37+
"median",
38+
"mean"
39+
]
40+
},
41+
"id":"000b7bf8-0271-46dd-90aa-cfe89026a55a",
42+
"unit":"B"
43+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
HTTP/1.1 200 OK
2+
Content-Type: application/json; charset=UTF-8
3+
4+
5+
[
6+
[
7+
"2017-05-16T00:00:00+00:00",
8+
86400.0,
9+
4.0
10+
],
11+
[
12+
"2017-05-16T07:00:00+00:00",
13+
3600.0,
14+
4.0
15+
],
16+
[
17+
"2017-05-16T08:00:00+00:00",
18+
3600.0,
19+
4.0
20+
],
21+
[
22+
"2017-05-16T07:15:00+00:00",
23+
300.0,
24+
4.0
25+
],
26+
[
27+
"2017-05-16T07:20:00+00:00",
28+
300.0,
29+
4.0
30+
],
31+
[
32+
"2017-05-16T07:35:00+00:00",
33+
300.0,
34+
4.0
35+
],
36+
[
37+
"2017-05-16T08:00:00+00:00",
38+
300.0,
39+
4.0
40+
]
41+
]

0 commit comments

Comments
 (0)