コード例 #1
0
    def test_get_s3_instances_clientError(self):
        testBoto = mockBoto(3)
        response = getS3Instances(self.user, testBoto)
        expected = {'Error': {'Code': '400', 'Message': 'Generic Error'}}

        self.assertEqual(response, expected)
コード例 #2
0
    def test_get_s3_instances_many(self):
        testBoto = mockBoto(2)
        response = getS3Instances(self.user, testBoto)
        expected = ['testBucket1', 'testBucket2']

        self.assertEqual(response, expected)
コード例 #3
0
    def test_get_s3_instances_singular(self):
        testBoto = mockBoto(1)
        response = getS3Instances(self.user, testBoto)
        expected = ['testBucket1']

        self.assertEqual(response, expected)
コード例 #4
0
    def test_get_s3_instances_none(self):
        testBoto = mockBoto(0)
        response = getS3Instances(self.user, testBoto)
        expected = []

        self.assertEqual(response, expected)
コード例 #5
0
    def test_get_rds_instances_many(self):
        testBoto = mockBoto(2)
        response = getRDSInstances("test-region", self.user, testBoto)
        expected = ['test1', 'test2']

        self.assertEqual(response, expected)
コード例 #6
0
    def test_get_rds_instances_none(self):
        testBoto = mockBoto(0)
        response = getRDSInstances("test-region", self.user, testBoto)
        expected = []

        self.assertEqual(response, expected)