Verified Commit 160ac981 authored by Mattia Rizzolo's avatar Mattia Rizzolo
Browse files

Merge branch 'fix/component-change' of salsa.debian.org:lyknode/debexpo into live

MR: mentors.debian.net-team/debexpo!174


Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parents a5f0e179 92be2e45
Pipeline #210394 passed with stage
in 8 minutes and 21 seconds
......@@ -243,8 +243,8 @@ class Repository():
for sumed_file in files_to_install:
# Remove old entry from database
try:
previous_entry = RepositoryFile.objects.get(path=join(
pool_dir, str(sumed_file)))
previous_entry = RepositoryFile.objects.get(path__endswith=join(
'/', str(sumed_file)))
except RepositoryFile.DoesNotExist:
pass
else:
......
......@@ -226,10 +226,15 @@ class TestRepositoryController(TestController):
self._setup_example_package()
self._repo_install_package(**self.package)
# Change the component
self.package['component'] = 'non-free'
self._repo_install_package(**self.package)
response = self.client.get(reverse('package', args=[package['name']]))
self.assertEquals(response.status_code, 200)
self.assertIn('/debian/pool/main/t/testpackage/testpackage_1.0-1.dsc',
str(response.content))
self.assertIn(
'/debian/pool/non-free/t/testpackage/testpackage_1.0-1.dsc',
str(response.content))
self._remove_example_package()
self._remove_example_user()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment