'Test helper method to get N apps.'

def test_my_apps(self):

    addon1 = Webapp.objects.create(name='test-1')
    AddonUser.objects.create(addon_id=addon1.id, user_id=999, listed=True)
    addon2 = Webapp.objects.create(name='test-2')
    AddonUser.objects.create(addon_id=addon2.id, user_id=999, listed=True)
    u = UserProfile.objects.get(id=999)
    addons = u.my_apps()
    self.assertTrue((sorted([a.name for a in addons]) == [addon1.name, addon2.name]))
