aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgabrielgio <gabriel.giovanini@pm.me>2021-07-14 21:47:48 +0200
committergabrielgio <gabriel.giovanini@pm.me>2021-07-14 21:47:48 +0200
commit417fb93a9368057e85e4c8bbaabc2ae5aca123d3 (patch)
treec41889fa5f1d7835d933b4a937ffc43e07344e58
parent4d43e402b2b4e27bbbbfe557216d95963a27af72 (diff)
downloadreddit-nextcloud-importer-417fb93a9368057e85e4c8bbaabc2ae5aca123d3.tar.gz
reddit-nextcloud-importer-417fb93a9368057e85e4c8bbaabc2ae5aca123d3.tar.bz2
reddit-nextcloud-importer-417fb93a9368057e85e4c8bbaabc2ae5aca123d3.zip
fix: Fix pathing
The module imports aren't working.
-rw-r--r--Dockerfile6
-rw-r--r--importer/__init__.py0
-rw-r--r--importer/downloader.py (renamed from src/downloader.py)0
-rw-r--r--importer/uploader.py (renamed from src/uploader.py)0
-rw-r--r--main.py (renamed from src/main.py)0
-rw-r--r--test/test_download.py4
-rw-r--r--test/test_uploader.py2
7 files changed, 6 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 307aede..a3b227c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,9 +7,9 @@ WORKDIR /opt
COPY requirements.txt .
RUN pip install -r requirements.txt
-COPY src/downloader.py .
-COPY src/main.py .
-COPY src/uploader.py .
+COPY importer/downloader.py .
+COPY importer/uploader.py .
+COPY main.py .
ENTRYPOINT python main.py \ No newline at end of file
diff --git a/importer/__init__.py b/importer/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/importer/__init__.py
diff --git a/src/downloader.py b/importer/downloader.py
index c67834b..c67834b 100644
--- a/src/downloader.py
+++ b/importer/downloader.py
diff --git a/src/uploader.py b/importer/uploader.py
index 7c7641a..7c7641a 100644
--- a/src/uploader.py
+++ b/importer/uploader.py
diff --git a/src/main.py b/main.py
index 266bb53..266bb53 100644
--- a/src/main.py
+++ b/main.py
diff --git a/test/test_download.py b/test/test_download.py
index 9bafc1c..a5c9386 100644
--- a/test/test_download.py
+++ b/test/test_download.py
@@ -2,7 +2,7 @@ import os
import pytest
-from src.downloader import SourceType, Downloader
+from importer.downloader import SourceType, Downloader
reddit_env = pytest.mark.skipif(
os.environ.get('CLIENT_ID', '') == '' or
@@ -16,7 +16,7 @@ reddit_env = pytest.mark.skipif(
@pytest.fixture
def mock_ydl_download(mocker):
# this function is responsible for downloading the file
- return mocker.patch('downloader.youtube_dl.YoutubeDL.process_info')
+ return mocker.patch('importer.downloader.youtube_dl.YoutubeDL.process_info')
@pytest.mark.parametrize('url,source_type', [
diff --git a/test/test_uploader.py b/test/test_uploader.py
index bcdf04b..7fe2f44 100644
--- a/test/test_uploader.py
+++ b/test/test_uploader.py
@@ -1,6 +1,6 @@
import pytest
-from uploader import create_folders
+from importer.uploader import create_folders
@pytest.fixture