def test_normal_required_key(self): self.assertEqual(settings.get("KAFKA_BOOTSTRAP_SERVERS"), ["kafka:9092"])
def test_missing_optional_key(self): self.assertEqual(settings.get("KAFKA_MAX_SEND_RETRIES", 5), 5)
def test_normal_required_key(self): self.assertEqual(settings.get('KAFKA_BOOTSTRAP_SERVERS'), ['kafka:9092'])
def test_missing_required_key(self): with self.assertRaises(ImproperlyConfigured): settings.get("KAFKA_BOOTSTRAP_SERVERS")
def test_normal_optional_key(self): self.assertEqual(settings.get('KAFKA_MAX_SEND_RETRIES', 5), 3)