Putting everything inside the package dir for publishing

This commit is contained in:
simonwt 2026-04-02 16:24:51 +01:00
parent 636564b873
commit 1bf4246989
38 changed files with 13 additions and 15 deletions

View file

@ -1,15 +0,0 @@
import unittest
from utils.get_parent_pksk_from_path import get_parent_pksk_from_path
class TestGetParentPkskFromPath(unittest.TestCase):
def test_root_path(self):
self.assertEqual(get_parent_pksk_from_path('/'), 'maintrunk#maintrunk')
def test_userprofile_path(self):
self.assertEqual(get_parent_pksk_from_path('/user/johndoe'), 'userprofile#johndoe')
def test_subwiki_path(self):
self.assertEqual(get_parent_pksk_from_path('/branch/12345'), 'subwiki#12345')
def test_invalid_entity(self):
with self.assertRaises(ValueError):
get_parent_pksk_from_path('/invalid/12345')

View file

@ -1,12 +0,0 @@
import unittest
from utils.get_post_pksk import get_post_pksk
class TestGetPostPksk(unittest.TestCase):
def test_get_post_pksk(self):
parent_pksk = 'userprofile#johndoe'
post_url = '/post/12345'
expected_result = {
"pk": 'userprofile#johndoe',
"sk": 'post#12345'
}
self.assertEqual(get_post_pksk(parent_pksk, post_url), expected_result)