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

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

src/s/a/sahara-HEAD/sahara/tests/unit/plugins/hdp/test_ambariplugin.py   sahara(Download)
    def test_get_node_processes(self):
        plugin = ap.AmbariPlugin()
        service_components = plugin.get_node_processes('1.3.2')
 
        self.assertEqual(13, len(service_components))
        normalized_config = cs.ClusterSpec(cluster_config_file).normalize()
 
        self.assertEqual(normalized_config.hadoop_version,
                         cluster.hadoop_version)
        self.assertEqual(len(normalized_config.node_groups),
        plugin._set_ambari_credentials(cluster_spec, ambari_info, '1.3.2')
 
        self.assertEqual(1, len(self.requests))
        request = self.requests[0]
        self.assertEqual('put', request.method)

src/s/a/sahara-2014.1/sahara/tests/unit/plugins/intel/client/test_services.py   sahara(Download)
 
        hdfs = services.HDFSService(ctx, 'hdfs')
        self.assertEqual('Stopped',
                         hdfs.get_datanode_status('master-001.domain'))
        self.assertEqual('Running',
                         hdfs.get_datanode_status('worker-001.domain'))
        self.assertEqual('Decomissioned',
 
        hdfs = services.HDFSService(ctx, 'hdfs')
        self.assertEqual('Stopped',
                         hdfs.get_datanode_status('master-001.domain'))
        self.assertEqual('Running',

src/s/a/sahara-2014.1/sahara/tests/unit/topology/test_topology.py   sahara(Download)
    def test_core_config(self):
        result = th.vm_awareness_core_config()
        self.assertEqual(4, len(result))
        for item in result:
            del item['description']
    def test_map_red_config(self):
        result = th.vm_awareness_mapred_config()
        self.assertEqual(3, len(result))
        for item in result:
            del item['description']
 
        top = th.generate_topology_map(cluster, False)
        self.assertEqual(top, {
            "i1": "/r1",
            "1.1.1.1": "/r1",
 
        top = th.generate_topology_map(cluster, True)
        self.assertEqual(top, {
            "i1": "/r1/o1",
            "1.1.1.1": "/r1/o1",
    def test_read_swift_topology(self):
        topology = self._read_swift_topology("")
        self.assertEqual(topology, {})
 
        topology = self._read_swift_topology(

src/s/a/sahara-HEAD/sahara/tests/unit/topology/test_topology.py   sahara(Download)
    def test_core_config(self):
        result = th.vm_awareness_core_config()
        self.assertEqual(4, len(result))
        for item in result:
            del item['description']
    def test_map_red_config(self):
        result = th.vm_awareness_mapred_config()
        self.assertEqual(3, len(result))
        for item in result:
            del item['description']
 
        top = th.generate_topology_map(cluster, False)
        self.assertEqual(top, {
            "i1": "/r1",
            "1.1.1.1": "/r1",
 
        top = th.generate_topology_map(cluster, True)
        self.assertEqual(top, {
            "i1": "/r1/o1",
            "1.1.1.1": "/r1/o1",
    def test_read_swift_topology(self):
        topology = self._read_swift_topology("")
        self.assertEqual(topology, {})
 
        topology = self._read_swift_topology(

src/s/a/sahara-2014.1/sahara/tests/unit/plugins/intel/v3_0_2/test_client.py   sahara(Download)
 
        post.return_value = r.make_resp(data)
        self.assertEqual(client.cluster.create(), data)
 
        get.return_value = r.make_resp(data)
        self.assertEqual(client.cluster.get(), data)
        client.cluster.install_software(['bla-bla'])
 
        self.assertEqual(post.call_count, 2)
        self.assertEqual(get.call_count, 2)
 
        client.nodes.stop(['n1'])
 
        self.assertEqual(delete.call_count, 1)
        self.assertEqual(post.call_count, 4)
        self.assertEqual(get.call_count, 3)

src/s/a/sahara-2014.1/sahara/tests/unit/plugins/intel/v2_5_1/test_client.py   sahara(Download)
 
        post.return_value = r.make_resp(data)
        self.assertEqual(client.cluster.create(), data)
 
        get.return_value = r.make_resp(data)
        self.assertEqual(client.cluster.get(), data)
        client.cluster.install_software(['bla-bla'])
 
        self.assertEqual(post.call_count, 2)
        self.assertEqual(get.call_count, 2)
 
        client.nodes.stop(['n1'])
 
        self.assertEqual(delete.call_count, 1)
        self.assertEqual(post.call_count, 4)
        self.assertEqual(get.call_count, 3)

src/s/a/sahara-HEAD/sahara/tests/unit/swift/test_swift_helper.py   sahara(Download)
 
        result = h.get_swift_configs()
        self.assertEqual(8, len(result))
        self.assertIn({'name': "fs.swift.service.sahara.tenant",
                       'value': 'test_tenant', 'description': ''}, result)

src/s/a/sahara-2014.1/sahara/tests/unit/swift/test_swift_helper.py   sahara(Download)
 
        result = h.get_swift_configs()
        self.assertEqual(7, len(result))
        self.assertIn({'name': "fs.swift.service.sahara.tenant",
                       'value': 'test_tenant', 'description': ''}, result)

src/s/a/sahara-HEAD/sahara/tests/unit/utils/openstack/test_base.py   sahara(Download)
 
        self.override_config("os_region_name", "RegionOne")
        self.assertEqual("http://172.18.184.5:8774/v2",
                         b.url_for(service_catalog, "compute"))
 
        self.override_config("os_region_name", "RegionTwo")
        self.assertEqual("http://172.18.184.6:8774/v2",