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