コード例 #1
0
 def test_redis_container_crawler_fordocker(self, *args):
     c = RedisContainerCrawler()
     emitted_tuple = c.crawl("mockcontainerid")[0]
     self.assertEqual(emitted_tuple[0], "redis",
                      "feature key must be equal to redis")
     self.assertIsInstance(emitted_tuple[1], RedisFeature)
     self.assertEqual(emitted_tuple[2], "application",
                      "feature type must be equal to application")
コード例 #2
0
 def test_redis_container_crawler_fordocker(self, *args):
     c = RedisContainerCrawler()
     emitted_tuple = c.crawl("mockcontainerid")[0]
     self.assertEqual(emitted_tuple[0], "redis",
                      "feature key must be equal to redis")
     self.assertIsInstance(emitted_tuple[1], RedisFeature)
     self.assertEqual(emitted_tuple[2], "application",
                      "feature type must be equal to application")
コード例 #3
0
 def test_redis_container_no_connect(self, *args):
     c = RedisContainerCrawler()
     with self.assertRaises(ConnectionError):
         c.crawl(1234)
コード例 #4
0
 def test_no_available_ports(self):
     c = RedisContainerCrawler()
     c.crawl(1234)
     pass
コード例 #5
0
 def test_get_feature(self):
     c = RedisContainerCrawler()
     self.assertEqual(c.get_feature(), "redis")
コード例 #6
0
 def test_redis_container_no_connect(self, *args):
     c = RedisContainerCrawler()
     with self.assertRaises(ConnectionError):
         c.crawl(1234)
コード例 #7
0
 def test_no_available_ports(self):
     c = RedisContainerCrawler()
     c.crawl(1234)
     pass
コード例 #8
0
 def test_get_feature(self):
     c = RedisContainerCrawler()
     self.assertEqual(c.get_feature(), "redis")
コード例 #9
0
 def test_no_available_ports(self):
     c = RedisContainerCrawler()
     with self.assertRaises(ConnectionError):
         c.crawl("mockcontainerid")
コード例 #10
0
 def test_set_default_port(self):
     c = RedisContainerCrawler()
     emitted_tuple = c.crawl("mockcontainerid")[0]
     self.assertEqual(emitted_tuple[0], "redis",
                      "feature key must be equal to redis")
コード例 #11
0
 def test_none_redis_container_crawler(self):
     c = RedisContainerCrawler()
     with self.assertRaises(NameError):
         c.crawl("mockcontainerid")
コード例 #12
0
 def test_get_feature(self):
     c = RedisContainerCrawler()
     self.assertEqual(c.get_feature(), "application")
コード例 #13
0
 def test_set_default_port(self):
     c = RedisContainerCrawler()
     emitted_tuple = c.crawl("mockcontainerid")[0]
     self.assertEqual(emitted_tuple[0], "redis",
                      "feature key must be equal to redis")
コード例 #14
0
 def test_no_available_ports(self):
     c = RedisContainerCrawler()
     with self.assertRaises(ConnectionError):
         c.crawl("mockcontainerid")
コード例 #15
0
 def test_none_redis_container_crawler(self):
     c = RedisContainerCrawler()
     with self.assertRaises(NameError):
         c.crawl("mockcontainerid")