Add unit tests for gun calculation

This commit is contained in:
Evan Cordell 2017-04-12 14:43:19 -04:00
parent 70ae34357f
commit 883692345b
2 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,6 @@
import logging
from urlparse import urljoin
from posixpath import join
import requests
@ -107,7 +108,7 @@ class TUFMetadataAPI(object):
return True
def _gun(self, namespace, repository):
return urljoin(self._gun_prefix, namespace, repository)
return join(self._gun_prefix, namespace, repository)
def _parse_signed(self, json_response):
""" Attempts to parse the targets from a metadata response """