summaryrefslogtreecommitdiff
path: root/src/leap/crypto/tests/fake_provider.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-06-28 11:14:08 -0300
committerIvan Alejandro <ivanalejandro0@yahoo.com.ar>2013-06-28 11:14:08 -0300
commit432a5e058f1d1a3722ed3ab5c350d522b7795bf4 (patch)
tree9febdba365812c65e9a2296ca6a857353371217b /src/leap/crypto/tests/fake_provider.py
parent1a1cd679a6f6c86ff8965f26f4fc463b98eba4ec (diff)
parent6fcf0faa8b23bbdc1b9dd462d24cbb30d0c79652 (diff)
Merge branch 'feature/coverage_eipbootstrapper' into develop
Diffstat (limited to 'src/leap/crypto/tests/fake_provider.py')
-rwxr-xr-xsrc/leap/crypto/tests/fake_provider.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/leap/crypto/tests/fake_provider.py b/src/leap/crypto/tests/fake_provider.py
index f86d5ca9..54af485d 100755
--- a/src/leap/crypto/tests/fake_provider.py
+++ b/src/leap/crypto/tests/fake_provider.py
@@ -306,9 +306,7 @@ class FileModified(File):
since = request.getHeader('if-modified-since')
if since:
tsince = time.strptime(since.replace(" GMT", ""))
- tfrom = time.strptime(time.ctime(os.path.getmtime(
- os.path.join(_here,
- "test_provider.json"))))
+ tfrom = time.strptime(time.ctime(os.path.getmtime(self.path)))
if tfrom > tsince:
return File.render_GET(self, request)
else:
@@ -350,12 +348,13 @@ def get_provider_factory():
config = Resource()
config.putChild(
"eip-service.json",
- File("./eip-service.json"))
+ FileModified(
+ os.path.join(_here, "eip-service.json")))
apiv1 = Resource()
apiv1.putChild("config", config)
apiv1.putChild("sessions", API_Sessions())
apiv1.putChild("users", FakeUsers(None))
- apiv1.putChild("cert", File(
+ apiv1.putChild("cert", FileModified(
os.path.join(_here,
'openvpn.pem')))
root.putChild("1", apiv1)