diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7e95a73..73f6fb2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,5 @@
pytest:
image: python:3.12-alpine
- only:
- - main
script:
- sh tests/start_tests_gitlab.sh
- sed -i "s#/builds/DasMoorhuhn/autopicture-v3/src#${CI_PROJECT_DIR}#g" coverage.xml
diff --git a/src/config.py b/src/config.py
index 003cbfe..bdb3c8d 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1,4 +1,5 @@
import yaml
+import os
config_file = "config.yml"
diff --git a/tests/test_config.py b/tests/test_config.py
index dbd737a..c17e3de 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -1,6 +1,21 @@
import unittest
+from src import config as config_module
+
class TestConfig(unittest.TestCase):
- def test_config(self):
- pass
+ def test_config_class(self):
+ 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"
diff --git a/tests/test_process.py b/tests/test_process.py
index 6cb6e7e..a97647e 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -1,10 +1,12 @@
import unittest
from unittest.mock import Mock
+from src import config
from src.process import start_process
+config.config_file = "src/config.yml"
+
-@unittest.skip("")
class TestProcess(unittest.TestCase):
def test_process(self):
start_process(logger=Mock())
diff --git a/tests/test_with_real_data.py b/tests/test_with_real_data.py
index e05068c..aeddb93 100644
--- a/tests/test_with_real_data.py
+++ b/tests/test_with_real_data.py
@@ -42,8 +42,11 @@ class TestSamsung(unittest.TestCase):
assert image.make == "samsung"
-@unittest.skip("")
class TestApple(unittest.TestCase):
- def test_iphone(self):
- pass
+ def test_iphone_x(self):
+ 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"