File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,30 @@ def tearDown(self) -> None:
10
10
for metric in metrics :
11
11
metric .archive ()
12
12
13
+ def test_list (self ):
14
+ """Ensure PermissionMembership.list returns a list of PermissionMembership instances."""
15
+ # fixture
16
+ _ = Metric .create (
17
+ name = "My Metric" ,
18
+ table_id = 1 ,
19
+ definition = {
20
+ "aggregation" : [["count" ]],
21
+ }
22
+ )
23
+ _ = Metric .create (
24
+ name = "My Metric" ,
25
+ table_id = 1 ,
26
+ definition = {
27
+ "aggregation" : [["count" ]],
28
+ }
29
+ )
30
+
31
+ metrics = Metric .list ()
32
+
33
+ self .assertIsInstance (metrics , list )
34
+ self .assertEqual (2 , len (metrics ))
35
+ self .assertTrue (all ([isinstance (m , Metric ) for m in metrics ]))
36
+
13
37
def test_get (self ):
14
38
"""
15
39
Ensure Metric.get returns a Metric instance for a given ID, or
You can’t perform that action at this time.
0 commit comments