def test_get_premium_message_with_pvt_vul(self):
     """Test Get Premium Message With Private Vulnerabilities."""
     obj = CABatchResponseBuilder(self.eco)
     obj.public_vul = 0
     obj.pvt_vul = 1
     obj.package = "django"
     obj.version = "1.1"
     msg = obj.get_premium_message(1)
     ideal_msg = "django - 1.1 has 1 security advisory with 1 exploitable vulnerabilities. "
     self.assertEqual(msg, ideal_msg)
 def test_get_premium_message_with_public_vul(self):
     """Test Get Premium Message With Public Vulnerabilities."""
     obj = CABatchResponseBuilder(self.eco)
     obj.public_vul = 1
     obj.pvt_vul = 0
     obj.package = "django"
     obj.version = "1.1"
     msg = obj.get_premium_message(1)
     ideal_msg = "django - 1.1 has 1 known security vulnerability with " \
                 "1 exploitable vulnerabilities. No recommended version."
     self.assertEqual(msg, ideal_msg)
 def test_get_premium_message_with_0_exploit_vul(self):
     """Test Get Premium Message With Public Vulnerabilities."""
     obj = CABatchResponseBuilder(self.eco)
     obj.public_vul = 1
     obj.pvt_vul = 1
     obj.package = "django"
     obj.version = "1.1"
     obj.severity = ['high']
     msg = obj.get_premium_message(0)
     ideal_msg = "django - 1.1 has 1 known security vulnerability " \
                 "and 1 security advisory with high severity. No recommended version."
     self.assertEqual(msg, ideal_msg)