Exemple #1
0
 def get(self):
     return {
         'current_version': get_version(),
         'newer_version': VersionUpdateService.get_newer_version(),
         'download_link': VersionUpdateService.get_download_link()
     }
Exemple #2
0
 def get(self):
     return {
         "current_version": get_version(),
         "newer_version": VersionUpdateService.get_newer_version(),
         "download_link": VersionUpdateService.get_download_link(),
     }
def test_get_deployment_field_from_flawed_json_file(
        flawed_deployment_info_file_path):
    deployment = VersionUpdateService().get_deployment_from_file(
        flawed_deployment_info_file_path)
    assert deployment == "unknown"
def test_get_deployment_field_key_error(key_error_deployment_info_file_path):
    deployment = VersionUpdateService().get_deployment_from_file(
        key_error_deployment_info_file_path)
    assert deployment == "unknown"
def test_get_deployment_field_from_nonexistent_file():
    ghost_file = Path("ghost_file")
    deployment = VersionUpdateService().get_deployment_from_file(ghost_file)
    assert deployment == "unknown"
def test_get_deployment_field_from_file(deployment_info_file_path):
    deployment = VersionUpdateService().get_deployment_from_file(
        deployment_info_file_path)
    assert deployment == "develop"