def test_format_a_bad_number(self, log):
        p = Parsers(self.BAD_NUMBER_TYPE_A)

        self.assertEqual(p.get_data(), {})
        self.assertTrue(p.invalid)

        self.assertEqual(
            log.call_args[0][1], 'Phone number doesn\'t meet requirements: '
            'last_name, first_name, 1324152151352625, RED, 10013.')
    def test_bad_zip_code_type_a(self, log):
        p = Parsers(self.BAD_ZIP_A)

        self.assertEqual(p.get_data(), {})
        self.assertTrue(p.invalid)

        self.assertEqual(
            log.call_args[0][1], 'Zip code not found in data: '
            'last_name, first_name, (703)-742-0996, RED, 121311.')
    def test_format_c(self):
        p = Parsers(self.LINE_TYPE_C)
        data = p.get_data()

        self.assertEqual(data['first_name'], self.FIRST_NAME)
        self.assertEqual(data['last_name'], self.LAST_NAME)
        self.assertEqual(data['phone_number'], self.CLEAN_NUMBER)
        self.assertEqual(data['color'], self.COLOR)
        self.assertEqual(data['zip_code'], self.ZIPCODE)