Skip to content

Commit

Permalink
#10 add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
Noordsestern committed Sep 4, 2019
1 parent a6747c3 commit fe18fcb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DwdWeatherLibrary/DwdWeatherLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ def get_nearest_station(self, address : str):
location = self._GEOLOCATOR.geocode(address)
closest_station = self._DW_CLIENT.nearest_station(location.longitude, location.latitude)
return closest_station

@keyword(name="Get current temperature")
def get_current_temperature_from_address(self, address: str):
return []
18 changes: 18 additions & 0 deletions tests/robot/get_current_temperature.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
*** Settings ***
Library DwdWeatherLibrary
Force Tags acceptance_test

*** Test Cases ***
Test 'Get current temperature from station' for address
[Template] Execute 'Get current temperature from station'
33332 Gütersloh
Aachen
Berlin

*** Keywords ***
Execute 'Get current temperature from station'
[Arguments] ${address}
${station} Get station closest to address ${address}
should not be empty ${station} No station found for address:\t${address}
${current_temperature} Get current temperature ${station}
Should Not Be Empty ${current_temperature} No temperature found for station:\t${station}[name]

0 comments on commit fe18fcb

Please sign in to comment.