def test_deprecated_member(self):
        """
        Tests to make sure that fact errors it it contains a deprecated member
        """
        val = mock.Mock()
        gaapDeps = {}
        gaapDeps['OtherMember'] = (
             "Element was deprecated. Possible replacement is "
             "OtherCreditDerivativesMember."
        )
        val.usgaapDeprecations = gaapDeps
        bad_mem = mock.Mock(spec=ModelConcept)
        bad_mem.name = 'OtherMember'
        good_mem = mock.Mock(spec=ModelConcept)
        good_mem.name = 'OtherCreditDerivativesMember'

        self.assertTrue(
            dqc_us_0018._deprecated_dimension(
                val,
                bad_mem
            )
        )

        self.assertFalse(
           dqc_us_0018._deprecated_dimension(
               val,
               good_mem
           )
        )
    def test_deprecated_dimension(self):
        """
        Tests that fact errors if it contains a deprecated dimension
        """
        val = mock.Mock()
        gaapDeps = {}
        gaapDeps['ComponentOfOtherExpenseNonoperatingAxis'] = (
            "Element was deprecated because the financial reporting concept "
            "is no longer conveyed dimensionally."
        )
        val.usgaapDeprecations = gaapDeps
        bad_dim = mock.Mock(spec=ModelConcept)
        bad_dim.name = 'ComponentOfOtherExpenseNonoperatingAxis'
        good_dim = mock.Mock(spec=ModelConcept)
        good_dim.name = 'LegalEntityAxis'

        self.assertTrue(
            dqc_us_0018._deprecated_dimension(
                val,
                bad_dim
            )
        )

        self.assertFalse(
           dqc_us_0018._deprecated_dimension(
               val,
               good_dim
           )
        )
    def test_deprecated_member(self):
        """
        Tests to make sure that fact errors it it contains a deprecated member
        """
        val = mock.Mock()
        gaapDeps = {}
        gaapDeps['OtherMember'] = (
            "Element was deprecated. Possible replacement is "
            "OtherCreditDerivativesMember.")
        val.usgaapDeprecations = gaapDeps
        bad_mem = mock.Mock(spec=ModelConcept)
        bad_mem.name = 'OtherMember'
        good_mem = mock.Mock(spec=ModelConcept)
        good_mem.name = 'OtherCreditDerivativesMember'

        self.assertTrue(dqc_us_0018._deprecated_dimension(val, bad_mem))

        self.assertFalse(dqc_us_0018._deprecated_dimension(val, good_mem))
    def test_deprecated_dimension(self):
        """
        Tests that fact errors if it contains a deprecated dimension
        """
        val = mock.Mock()
        gaapDeps = {}
        gaapDeps['ComponentOfOtherExpenseNonoperatingAxis'] = (
            "Element was deprecated because the financial reporting concept "
            "is no longer conveyed dimensionally.")
        val.usgaapDeprecations = gaapDeps
        bad_dim = mock.Mock(spec=ModelConcept)
        bad_dim.name = 'ComponentOfOtherExpenseNonoperatingAxis'
        good_dim = mock.Mock(spec=ModelConcept)
        good_dim.name = 'LegalEntityAxis'

        self.assertTrue(dqc_us_0018._deprecated_dimension(val, bad_dim))

        self.assertFalse(dqc_us_0018._deprecated_dimension(val, good_dim))