Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(419)  |  Call(419)  |  Derive(0)  |  Import(0)

src/p/y/python-ceilometerclient-1.0.10/ceilometerclient/tests/v1/test_samples.py   python-ceilometerclient(Download)
            ('GET', '/v1/meters', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 0)
 
            ('GET', '/v1/sources/openstack/meters/this', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 1)
        self.assertEqual(samples[0].resource_id, 'b')

src/p/y/python-ceilometerclient-HEAD/ceilometerclient/tests/v1/test_samples.py   python-ceilometerclient(Download)
            ('GET', '/v1/meters', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 0)
 
            ('GET', '/v1/sources/openstack/meters/this', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 1)
        self.assertEqual(samples[0].resource_id, 'b')

src/p/y/python-ceilometerclient-1.0.10/ceilometerclient/tests/v2/test_samples.py   python-ceilometerclient(Download)
            ('GET', '/v2/meters/instance', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 1)
        self.assertEqual(samples[0].resource_id, 'resource-id')
                                     ]))
        expect = [('GET', '%s?%s' % (base_url, args), {}, None)]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 0)
 

src/p/y/python-ceilometerclient-HEAD/ceilometerclient/tests/v2/test_samples.py   python-ceilometerclient(Download)
            ('GET', '/v2/meters/instance', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 1)
        self.assertEqual(samples[0].resource_id, 'resource-id')
                                     ]))
        expect = [('GET', '%s?%s' % (base_url, args), {}, None)]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(samples), 0)
 

src/p/y/python-ceilometerclient-1.0.10/ceilometerclient/tests/v2/test_query_samples.py   python-ceilometerclient(Download)
            ('POST', '/v2/query/samples', {}, QUERY),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(samples))
 

src/p/y/python-ceilometerclient-HEAD/ceilometerclient/tests/v2/test_query_samples.py   python-ceilometerclient(Download)
            ('POST', '/v2/query/samples', {}, QUERY),
        ]
        self.assertEqual(expect, self.api.calls)
        self.assertEqual(1, len(samples))
 

src/p/y/python-ceilometerclient-1.0.10/ceilometerclient/tests/v2/test_shell.py   python-ceilometerclient(Download)
            method(self.cc, self.args)
            args, kwargs = self.cc.alarms.update.call_args
            self.assertEqual(self.ALARM_ID, args[0])
            self.assertEqual(42.0, kwargs.get('threshold'))
            if repeat_actions is not None:
                self.assertEqual(repeat_actions, kwargs.get('repeat_actions'))
            ceilometer_shell.do_alarm_threshold_create(self.cc, args)
            _, kwargs = self.cc.alarms.create.call_args
            self.assertEqual('cpu_high', kwargs.get('name'))
            self.assertEqual('instance running hot', kwargs.get('description'))
            actions = ['log://', 'http://example.com/alarm/state']

src/p/y/python-ceilometerclient-HEAD/ceilometerclient/tests/v2/test_shell.py   python-ceilometerclient(Download)
            method(self.cc, self.args)
            args, kwargs = self.cc.alarms.update.call_args
            self.assertEqual(self.ALARM_ID, args[0])
            self.assertEqual(42.0, kwargs.get('threshold'))
            if repeat_actions is not None:
                self.assertEqual(repeat_actions, kwargs.get('repeat_actions'))
            ceilometer_shell.do_alarm_threshold_create(self.cc, args)
            _, kwargs = self.cc.alarms.create.call_args
            self.assertEqual('cpu_high', kwargs.get('name'))
            self.assertEqual('instance running hot', kwargs.get('description'))
            actions = ['log://', 'http://example.com/alarm/state']

src/p/y/python-ceilometerclient-1.0.10/ceilometerclient/tests/v2/test_events.py   python-ceilometerclient(Download)
            ('GET', '/v2/events', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(events), 3)
        self.assertEqual(events[0].event_type, 'Foo')
        self.assertEqual(events[1].event_type, 'Foo')
        self.assertEqual(events[2].event_type, 'Bar')

src/p/y/python-ceilometerclient-HEAD/ceilometerclient/tests/v2/test_events.py   python-ceilometerclient(Download)
            ('GET', '/v2/events', {}, None),
        ]
        self.assertEqual(self.api.calls, expect)
        self.assertEqual(len(events), 3)
        self.assertEqual(events[0].event_type, 'Foo')
        self.assertEqual(events[1].event_type, 'Foo')
        self.assertEqual(events[2].event_type, 'Bar')

  1 | 2 | 3 | 4 | 5  Next