コード例 #1
0
    def test_from_arguments(self):
        group_by = TagGroupBy.from_arguments(['host', 'cpu'])

        self.assertEqual(group_by.tags, ['host', 'cpu'])
コード例 #2
0
    def test_from_arguments(self):
        group_by = TagGroupBy.from_arguments(['host', 'cpu'])

        self.assertEqual(group_by.tags, ['host', 'cpu'])
コード例 #3
0
 def test_should_fail_if_arguments_are_not_list(self):
     with self.assertRaisesRegexp(
             GroupByException,
             "Invalid args type: <type 'str'>, must be a list or tuple."):
         TagGroupBy.from_arguments('not_a_list')
コード例 #4
0
 def test_should_fail_if_arguments_are_not_list(self):
     with self.assertRaisesRegexp(GroupByException, "Invalid args type: <type 'str'>, must be a list or tuple."):
         TagGroupBy.from_arguments('not_a_list')