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