def user_profile(self): """ Returns *Profile* namedtuples associated with logged in user """ if not self._dashboard_content: raise ClipperCardError('Must login first') return parser.parse_profile_data(self._dashboard_content)
def test_profile(self): profile = parser.parse_profile_data(self.test_content) self.assertEqual('John Smith', profile.name) self.assertEqual('*****@*****.**', profile.email) self.assertEqual('1 Main St SAN FRANCISCO, CA 94103', profile.address) self.assertEqual('415-555-5555', profile.phone)