@@ -344,31 +344,31 @@ def test_get_coin_market_chart_by_id(self):
344
344
345
345
346
346
#---------- /price/coins/{id}/status_updates ----------#
347
- @responses .activate
348
- def test_failed_get_coin_status_updates_by_id (self ):
349
- # Arrange
350
- responses .add (responses .GET , 'https://api.coingecko.com/api/v3/coins/litecoin/status_updates' ,
351
- status = 404 )
352
- exception = HTTPError ("HTTP Error" )
353
-
354
- # Act Assert
355
- with pytest .raises (HTTPError ) as HE :
356
- CoinGeckoAPI ().get_coin_status_updates_by_id ('litecoin' )
357
-
358
-
359
- @responses .activate
360
- def test_get_coin_status_updates_by_id (self ):
361
- # Arrange
362
- json_response = [ {'description' : 'Travala.com Partners with Litecoin Foundation to Champion Crypto Payments. \r \n #TravelWithLitecoin www.travala.com/litecoin\r \n \r \n Read the full announcement here: bit.ly/2LumY3b' , 'category' : 'general' , 'created_at' : '2019-05-14T13:56:43.282Z' , 'user' : 'Keith Yong' , 'user_title' : 'Operations Director' , 'pin' : False , 'project' : {'type' : 'Coin' , 'id' : 'litecoin' , 'name' : 'Litecoin' , 'symbol' : 'ltc' , 'image' : {'thumb' : 'https://assets.coingecko.com/coins/images/2/thumb/litecoin.png?1547033580' , 'small' : 'https://assets.coingecko.com/coins/images/2/small/litecoin.png?1547033580' , 'large' : 'https://assets.coingecko.com/coins/images/2/large/litecoin.png?1547033580' }}} ]
363
-
364
- responses .add (responses .GET , 'https://api.coingecko.com/api/v3/coins/litecoin/status_updates' ,
365
- json = json_response , status = 200 )
366
-
367
- # Act
368
- response = CoinGeckoAPI ().get_coin_status_updates_by_id ('litecoin' )
369
-
370
- ## Assert
371
- assert response == json_response
347
+ # @responses.activate
348
+ # def test_failed_get_coin_status_updates_by_id(self):
349
+ # # Arrange
350
+ # responses.add(responses.GET, 'https://api.coingecko.com/api/v3/coins/litecoin/status_updates',
351
+ # status = 404)
352
+ # exception = HTTPError("HTTP Error")
353
+ #
354
+ # # Act Assert
355
+ # with pytest.raises(HTTPError) as HE:
356
+ # CoinGeckoAPI().get_coin_status_updates_by_id('litecoin')
357
+ #
358
+ #
359
+ # @responses.activate
360
+ # def test_get_coin_status_updates_by_id(self):
361
+ # # Arrange
362
+ # json_response = [ {'description': 'Travala.com Partners with Litecoin Foundation to Champion Crypto Payments. \r\n#TravelWithLitecoin www.travala.com/litecoin\r\n\r\nRead the full announcement here: bit.ly/2LumY3b', 'category': 'general', 'created_at': '2019-05-14T13:56:43.282Z', 'user': 'Keith Yong', 'user_title': 'Operations Director', 'pin': False, 'project': {'type': 'Coin', 'id': 'litecoin', 'name': 'Litecoin', 'symbol': 'ltc', 'image': {'thumb': 'https://assets.coingecko.com/coins/images/2/thumb/litecoin.png?1547033580', 'small': 'https://assets.coingecko.com/coins/images/2/small/litecoin.png?1547033580', 'large': 'https://assets.coingecko.com/coins/images/2/large/litecoin.png?1547033580'}}} ]
363
+ #
364
+ # responses.add(responses.GET, 'https://api.coingecko.com/api/v3/coins/litecoin/status_updates',
365
+ # json = json_response, status = 200)
366
+ #
367
+ # # Act
368
+ # response = CoinGeckoAPI().get_coin_status_updates_by_id('litecoin')
369
+ #
370
+ # ## Assert
371
+ # assert response == json_response
372
372
373
373
374
374
#---------- /price/coins/{id}/contract/{contract_address} ----------#
@@ -577,60 +577,60 @@ def test_get_global(self):
577
577
578
578
579
579
580
- #---------- FINANCE ----------#
581
-
582
- #---------- /finance_platforms ----------#
583
-
584
- @responses .activate
585
- def test_failed_get_finance_platforms (self ):
586
- # Arrange
587
- responses .add (responses .GET , 'https://api.coingecko.com/api/v3/finance_platforms' ,
588
- status = 404 )
589
- exception = HTTPError ("HTTP Error" )
590
-
591
- # Act Assert
592
- with pytest .raises (HTTPError ) as HE :
593
- CoinGeckoAPI ().get_finance_platforms ()
594
-
595
- @responses .activate
596
- def test_get_finance_platforms (self ):
597
- # Arrange
598
- json_response = [{"name" : "Binance Lending" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Celsius Network" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Compound Finance" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "dYdX" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Nexo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Staked US" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://staked.us/" }, {"name" : "Cobo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://cobo.com/" }, {"name" : "Crypto.com" , "facts" : "" , "category" : "" , "centralized" : True , "website_url" : "https://crypto.com/en/" }]
599
-
600
- responses .add (responses .GET , 'https://api.coingecko.com/api/v3/finance_platforms' ,
601
- json = json_response , status = 200 )
602
-
603
- # Act
604
- response = CoinGeckoAPI ().get_finance_platforms ()
605
-
606
- ## Assert
607
- expected_response = [{"name" : "Binance Lending" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Celsius Network" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Compound Finance" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "dYdX" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Nexo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Staked US" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://staked.us/" }, {"name" : "Cobo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://cobo.com/" }, {"name" : "Crypto.com" , "facts" : "" , "category" : "" , "centralized" : True , "website_url" : "https://crypto.com/en/" }]
608
- assert response == expected_response
609
-
610
- #---------- /finance_products ----------#
611
-
612
- @responses .activate
613
- def test_failed_get_finance_products (self ):
614
- # Arrange
615
- responses .add (responses .GET , 'https://api.coingecko.com/api/v3/finance_products' ,
616
- status = 404 )
617
- exception = HTTPError ("HTTP Error" )
618
-
619
- # Act Assert
620
- with pytest .raises (HTTPError ) as HE :
621
- CoinGeckoAPI ().get_finance_products ()
622
-
623
- @responses .activate
624
- def test_get_finance_products (self ):
625
- # Arrange
626
- json_response = [{"name" : "Binance Lending" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Celsius Network" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Compound Finance" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "dYdX" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Nexo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Staked US" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://staked.us/" }, {"name" : "Cobo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://cobo.com/" }, {"name" : "Crypto.com" , "facts" : "" , "category" : "" , "centralized" : True , "website_url" : "https://crypto.com/en/" }]
627
-
628
- responses .add (responses .GET , 'https://api.coingecko.com/api/v3/finance_platforms' ,
629
- json = json_response , status = 200 )
630
-
631
- # Act
632
- response = CoinGeckoAPI ().get_finance_platforms ()
633
-
634
- ## Assert
635
- expected_response = [{"name" : "Binance Lending" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Celsius Network" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Compound Finance" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "dYdX" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Nexo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "" }, {"name" : "Staked US" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://staked.us/" }, {"name" : "Cobo" , "facts" : "" , "category" : "" , "centralized" : False , "website_url" : "https://cobo.com/" }, {"name" : "Crypto.com" , "facts" : "" , "category" : "" , "centralized" : True , "website_url" : "https://crypto.com/en/" }]
636
- assert response == expected_response
580
+ # # ---------- FINANCE ----------#
581
+ #
582
+ # # ---------- /finance_platforms ----------#
583
+ #
584
+ # @responses.activate
585
+ # def test_failed_get_finance_platforms(self):
586
+ # # Arrange
587
+ # responses.add(responses.GET, 'https://api.coingecko.com/api/v3/finance_platforms',
588
+ # status = 404)
589
+ # exception = HTTPError("HTTP Error")
590
+ #
591
+ # # Act Assert
592
+ # with pytest.raises(HTTPError) as HE:
593
+ # CoinGeckoAPI().get_finance_platforms()
594
+ #
595
+ # @responses.activate
596
+ # def test_get_finance_platforms(self):
597
+ # # Arrange
598
+ # json_response = [{"name": "Binance Lending", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Celsius Network", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Compound Finance", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "dYdX", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Nexo", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Staked US", "facts": "", "category": "", "centralized": False, "website_url": "https://staked.us/"}, {"name": "Cobo", "facts": "", "category": "", "centralized": False, "website_url": "https://cobo.com/"}, {"name": "Crypto.com", "facts": "", "category": "", "centralized": True, "website_url": "https://crypto.com/en/"}]
599
+ #
600
+ # responses.add(responses.GET, 'https://api.coingecko.com/api/v3/finance_platforms',
601
+ # json = json_response, status = 200)
602
+ #
603
+ # # Act
604
+ # response = CoinGeckoAPI().get_finance_platforms()
605
+ #
606
+ # ## Assert
607
+ # expected_response = [{"name": "Binance Lending", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Celsius Network", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Compound Finance", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "dYdX", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Nexo", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Staked US", "facts": "", "category": "", "centralized": False, "website_url": "https://staked.us/"}, {"name": "Cobo", "facts": "", "category": "", "centralized": False, "website_url": "https://cobo.com/"}, {"name": "Crypto.com", "facts": "", "category": "", "centralized": True, "website_url": "https://crypto.com/en/"}]
608
+ # assert response == expected_response
609
+ #
610
+ # # ---------- /finance_products ----------#
611
+ #
612
+ # @responses.activate
613
+ # def test_failed_get_finance_products(self):
614
+ # # Arrange
615
+ # responses.add(responses.GET, 'https://api.coingecko.com/api/v3/finance_products',
616
+ # status = 404)
617
+ # exception = HTTPError("HTTP Error")
618
+ #
619
+ # # Act Assert
620
+ # with pytest.raises(HTTPError) as HE:
621
+ # CoinGeckoAPI().get_finance_products()
622
+ #
623
+ # @responses.activate
624
+ # def test_get_finance_products(self):
625
+ # # Arrange
626
+ # json_response = [{"name": "Binance Lending", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Celsius Network", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Compound Finance", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "dYdX", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Nexo", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Staked US", "facts": "", "category": "", "centralized": False, "website_url": "https://staked.us/"}, {"name": "Cobo", "facts": "", "category": "", "centralized": False, "website_url": "https://cobo.com/"}, {"name": "Crypto.com", "facts": "", "category": "", "centralized": True, "website_url": "https://crypto.com/en/"}]
627
+ #
628
+ # responses.add(responses.GET, 'https://api.coingecko.com/api/v3/finance_platforms',
629
+ # json = json_response, status = 200)
630
+ #
631
+ # # Act
632
+ # response = CoinGeckoAPI().get_finance_platforms()
633
+ #
634
+ # ## Assert
635
+ # expected_response = [{"name": "Binance Lending", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Celsius Network", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Compound Finance", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "dYdX", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Nexo", "facts": "", "category": "", "centralized": False, "website_url": ""}, {"name": "Staked US", "facts": "", "category": "", "centralized": False, "website_url": "https://staked.us/"}, {"name": "Cobo", "facts": "", "category": "", "centralized": False, "website_url": "https://cobo.com/"}, {"name": "Crypto.com", "facts": "", "category": "", "centralized": True, "website_url": "https://crypto.com/en/"}]
636
+ # assert response == expected_response
0 commit comments