Merge branch 'develop' into 'main'
develop See merge request DasMoorhuhn/autopicture-v3!6
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
pytest:
|
pytest:
|
||||||
image: python:3.12-alpine
|
image: python:3.12-alpine
|
||||||
only:
|
|
||||||
- main
|
|
||||||
script:
|
script:
|
||||||
- sh tests/start_tests_gitlab.sh
|
- sh tests/start_tests_gitlab.sh
|
||||||
- sed -i "s#<source>/builds/DasMoorhuhn/autopicture-v3/src</source>#<source>${CI_PROJECT_DIR}</source>#g" coverage.xml
|
- sed -i "s#<source>/builds/DasMoorhuhn/autopicture-v3/src</source>#<source>${CI_PROJECT_DIR}</source>#g" coverage.xml
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import yaml
|
import yaml
|
||||||
|
import os
|
||||||
|
|
||||||
config_file = "config.yml"
|
config_file = "config.yml"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,21 @@
|
|||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
|
from src import config as config_module
|
||||||
|
|
||||||
|
|
||||||
class TestConfig(unittest.TestCase):
|
class TestConfig(unittest.TestCase):
|
||||||
def test_config(self):
|
def test_config_class(self):
|
||||||
pass
|
test_config = {
|
||||||
|
"src": "/src/src",
|
||||||
|
"dst": "/src/dst"
|
||||||
|
}
|
||||||
|
|
||||||
|
config = config_module.Config(test_config)
|
||||||
|
assert config.src == "/src/src"
|
||||||
|
assert config.dst == "/src/dst"
|
||||||
|
|
||||||
|
def test_get_config(self):
|
||||||
|
config_module.config_file = "src/config.yml"
|
||||||
|
config = config_module.get_config()
|
||||||
|
assert config.src == "../app/Temp"
|
||||||
|
assert config.dst == "../app/Bilder"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import unittest
|
import unittest
|
||||||
from unittest.mock import Mock
|
from unittest.mock import Mock
|
||||||
|
|
||||||
|
from src import config
|
||||||
from src.process import start_process
|
from src.process import start_process
|
||||||
|
|
||||||
|
config.config_file = "src/config.yml"
|
||||||
|
|
||||||
|
|
||||||
@unittest.skip("")
|
|
||||||
class TestProcess(unittest.TestCase):
|
class TestProcess(unittest.TestCase):
|
||||||
def test_process(self):
|
def test_process(self):
|
||||||
start_process(logger=Mock())
|
start_process(logger=Mock())
|
||||||
|
|||||||
@@ -42,8 +42,11 @@ class TestSamsung(unittest.TestCase):
|
|||||||
assert image.make == "samsung"
|
assert image.make == "samsung"
|
||||||
|
|
||||||
|
|
||||||
@unittest.skip("")
|
|
||||||
class TestApple(unittest.TestCase):
|
class TestApple(unittest.TestCase):
|
||||||
def test_iphone(self):
|
def test_iphone_x(self):
|
||||||
pass
|
copy_images(brand="iphone", model="x")
|
||||||
|
files = recursive_scan_folder(path=TEST_FOLDER)
|
||||||
|
meta_data = get_meta_data(images=files)
|
||||||
|
for image in meta_data:
|
||||||
|
assert image.make == "Apple"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user