File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 3838 pip install -r ./src/requirements.txt
3939 - name : Run Tests
4040 run : |
41- python -m unittest discover -s ./src/tests/ -p 'test_*.py' | grep -v "test_import_raster.py"
41+ python -m unittest discover -s ./src/tests/ -p 'test_*.py'
4242
4343
4444# ------- END Scripts PROCCESS -------- #
Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ pytz==2022.7.1
2323sentinels == 1.0.0
2424shapely == 2.0.1
2525six == 1.16.0
26- tqdm == 4.65.0
26+ tqdm == 4.65.0
27+ requests == 2.28.1
Original file line number Diff line number Diff line change 11import unittest
2- from geo .Geoserver import Geoserver
2+ # from geo.Geoserver import Geoserver
33import requests
44
55geoserver_url = 'https://isa.ciat.cgiar.org/geoserver2'
66username = 'gapuser'
77password = 'pass'
88
99# create a geoserver instance
10- geo = Geoserver (geoserver_url , username = username , password = password )
10+ # geo = Geoserver(geoserver_url, username=username, password=password)
1111
1212class TestGeoserver (unittest .TestCase ):
1313
1414 def test_connection (self ):
15- """Method to test the connection to Geoserver"""
16- try :
15+ response = requests .get (geoserver_url )
16+ print (response )
17+ self .assertEqual (200 , response .status_code )
18+ """ try:
1719 auth = (geo.username, geo.password)
1820 response = requests.get(geo.service_url, auth=auth)
1921 if response.status_code == 200:
@@ -25,8 +27,7 @@ def test_connection(self):
2527 return False
2628
2729 def test_connection_successful(self):
28- """Method to test if the connection to Geoserver was successful"""
29- self .assertTrue (self .test_connection ())
30+ self.assertTrue(self.test_connection()) """
3031
3132if __name__ == '__main__' :
3233 unittest .main ()
You can’t perform that action at this time.
0 commit comments