def test_get_data(self): r = tt.get_data('aebhughes') self.assertIn('recenttracks', r) d = r.get('recenttracks', None) self.assertNotEqual(d, None) t = d.get('track', None) self.assertNotEqual(t, None) one_t = t[0] self.assertIn('album', one_t) self.assertIn('name', one_t) self.assertIn('date', one_t)
def test_create_rec(self): r = tt.get_data('aebhughes') cr = tt.create_rec(r) self.assertGreater(len(cr), 0)