コード例 #1
0
ファイル: cloud_client_test.py プロジェクト: xe1gyq/sieraUAV
 def __init__(self, *args, **kwargs):
     api_key = os.environ['DRONEAPI_KEY']
     self.api = CloudClient(api_key)
     super(CloudClientTest, self).__init__(*args, **kwargs)
コード例 #2
0
ファイル: cloud_client_test.py プロジェクト: xe1gyq/sieraUAV
class CloudClientTest(unittest.TestCase):
    def __init__(self, *args, **kwargs):
        api_key = os.environ['DRONEAPI_KEY']
        self.api = CloudClient(api_key)
        super(CloudClientTest, self).__init__(*args, **kwargs)

    def setUp(self):
        """Create simple data set with headers"""
        pass

    def tearDown(self):
        """Teardown."""
        pass

    def test_unhandled_endpoint(self):
        self.assertRaises(CloudError, self.api.bogus)

    def test_mission_endpoint(self):
        self.api.mission()

    def test_mission_static_map(self):
        self.api.mission_staticMap()

    def test_mission_by_id_endpoint(self):
        self.api.mission_(1141)

    def test_mission_by_id_analysis_endpoint(self):
        self.api.mission_analysis(1141)

    def test_mission_by_id_geo_endpoint(self):
        self.api.mission_geo(1141)

    def test_mission_by_id_messages_endpoint(self):
        self.api.mission_messages(1141)

    def test_mission_by_id_parameters_endpoint(self):
        self.api.mission_parameters(1141)

    def test_mission_by_id_dseries_endpoint(self):
        self.api.mission_dseries(1141)

    def test_vehicle_endpoint(self):
        self.api.vehicle()

    def test_vehicle_by_id_endpoint(self):
        self.api.vehicle_(218)

    def test_user_endpoint(self):
        self.api.user()

    def test_user_by_login_endpoint(self):
        self.api.user('mrpollo')
コード例 #3
0
class CloudClientTest(unittest.TestCase):
    def __init__(self, *args, **kwargs):
        api_key = os.environ['DRONEAPI_KEY']
        self.api = CloudClient(api_key)
        super(CloudClientTest, self).__init__(*args, **kwargs)

    def setUp(self):
        """Create simple data set with headers"""
        pass

    def tearDown(self):
        """Teardown."""
        pass

    def test_unhandled_endpoint(self):
        self.assertRaises(CloudError, self.api.bogus)

    def test_mission_endpoint(self):
        self.api.mission()

    def test_mission_static_map(self):
        self.api.mission_staticMap()

    def test_mission_by_id_endpoint(self):
        self.api.mission_(1141)

    def test_mission_by_id_analysis_endpoint(self):
        self.api.mission_analysis(1141)

    def test_mission_by_id_geo_endpoint(self):
        self.api.mission_geo(1141)

    def test_mission_by_id_messages_endpoint(self):
        self.api.mission_messages(1141)

    def test_mission_by_id_parameters_endpoint(self):
        self.api.mission_parameters(1141)

    def test_mission_by_id_dseries_endpoint(self):
        self.api.mission_dseries(1141)

    def test_vehicle_endpoint(self):
        self.api.vehicle()

    def test_vehicle_by_id_endpoint(self):
        self.api.vehicle_(218)

    def test_user_endpoint(self):
        self.api.user()

    def test_user_by_login_endpoint(self):
        self.api.user('mrpollo')
コード例 #4
0
 def __init__(self, *args, **kwargs):
     api_key = os.environ['DRONEAPI_KEY']
     self.api = CloudClient(api_key)
     super(CloudClientTest, self).__init__(*args, **kwargs)
コード例 #5
0
def setup_module():
    global api
    api_key = os.environ['DRONEAPI_KEY']
    api = CloudClient(api_key)