Skip to content

Commit

Permalink
Adding test to get_qualify_version
Browse files Browse the repository at this point in the history
  • Loading branch information
alallema committed May 30, 2023
1 parent 0113530 commit 137aea6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/config_loader/basic_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: utf-8
from scraper.src.config.version import __version__, qualified_version
from scraper.src.config.config_loader import ConfigLoader
from .abstract import config
import pytest
Expand Down Expand Up @@ -48,3 +49,14 @@ def test_excpetion_when_shadowing_(self):

with pytest.raises(Exception):
ConfigLoader(c)

def test_get_qualified_version(self):
""" Old variable scrap_url must be spread to scrape_url. If one is defined, the previous one must be used"""
# Given
c = config({
'user_agent': qualified_version()
})

config_loaded = ConfigLoader(c)

assert config_loaded.user_agent == f"Meilisearch DocsScraper (v{__version__})"

0 comments on commit 137aea6

Please sign in to comment.