def test_from_arn(self):
        proper_arns = [
            'events.amazonaws.com',
            'cloudtrail.amazonaws.com',
            'arn:aws:iam::012345678910:root',
            'arn:aws:iam::012345678910:role/SomeTestRoleForTesting',
            'arn:aws:iam::012345678910:instance-profile/SomeTestInstanceProfileForTesting',
            'arn:aws:iam::012345678910:role/*',
            'arn:aws:iam::012345678910:role/SomeTestRole*',
            'arn:aws:s3:::some-s3-bucket',
            'arn:aws:s3:*:*:some-s3-bucket',
            'arn:aws:s3:::some-s3-bucket/some/path/within/the/bucket'
            'arn:aws:s3:::some-s3-bucket/*',
            'arn:aws:ec2:us-west-2:012345678910:instance/*',
            'arn:aws:ec2:ap-northeast-1:012345678910:security-group/*',
            'arn:aws-cn:ec2:ap-northeast-1:012345678910:security-group/*',
            'arn:aws-us-gov:ec2:gov-west-1:012345678910:instance/*'
        ]

        # Proper ARN Tests:
        for arn in proper_arns:
            app.logger.info('Testing Proper ARN: {}'.format(arn))
            arn_obj = ARN(arn)

            self.assertFalse(arn_obj.error)
            if "root" in arn:
                self.assertTrue(arn_obj.root)
            else:
                self.assertFalse(arn_obj.root)

            if arn in ".amazonaws.com":
                self.assertTrue(arn_obj.service)
            else:
                self.assertFalse(arn_obj.service)

        bad_arns = [
            'arn:aws:iam::012345678910',
            'arn:aws:iam::012345678910:',
            '*',
            'arn:s3::::',
            "arn:arn:arn:arn:arn:arn"

        ]

        # Improper ARN Tests:
        for arn in bad_arns:
            app.logger.info('Testing IMPROPER ARN: {}'.format(arn))
            arn_obj = ARN(arn)

            self.assertTrue(arn_obj.error)
dataset/ETHPy150Open Netflix/security_monkey/security_monkey/tests/test_arn.py/ARNTestCase.test_from_arn/swapped operands of `in`