def test_add_with_empty(self): update = Update([], self.config) req_file = Mock() req = Mock() req.key = "django" req.is_pinned = False req.latest_version_within_specs = "1.10" update.add(req, req_file) self.assertEqual("django-pin" in update, True) self.assertEqual(len(update["django-pin"]), 1)
def test_add_with_empty(self): update = Update([]) req_file = Mock() req = Mock() req.key = "django" req.is_pinned = False req.latest_version_within_specs = "1.10" update.add(req, req_file) self.assertEqual("django-pin" in update, True) self.assertEqual(len(update["django-pin"]), 1)