Remove nbsp characters in comments, remove "u" in front of strings
This commit is contained in:
parent
6c9976f46a
commit
aa524bd613
@ -37,7 +37,7 @@ class TestBaseAuthRequests(HtpasswdAuthSystem):
|
||||
|
||||
@with_setup(HtpasswdAuthSystem.setup, HtpasswdAuthSystem.teardown)
|
||||
def test_root(self):
|
||||
"""Tests a GET request at "/"."""
|
||||
"""Tests a GET request at "/"."""
|
||||
status, headers, answer = self.request(
|
||||
"GET", "/", HTTP_AUTHORIZATION=self.userpass)
|
||||
assert status == 200
|
||||
|
@ -35,12 +35,12 @@ class BaseRequests(object):
|
||||
status, headers, answer = self.request("GET", "/")
|
||||
assert status == 200
|
||||
assert "Radicale works!" in answer
|
||||
# Tests the creation of the collection
|
||||
# Test the creation of the collection
|
||||
status, headers, answer = self.request("GET", "/calendar.ics/")
|
||||
assert u"BEGIN:VCALENDAR" in answer
|
||||
assert u"VERSION:2.0" in answer
|
||||
assert u"END:VCALENDAR" in answer
|
||||
assert u"PRODID:-//Radicale//NONSGML Radicale Server//EN" in answer
|
||||
assert "BEGIN:VCALENDAR" in answer
|
||||
assert "VERSION:2.0" in answer
|
||||
assert "END:VCALENDAR" in answer
|
||||
assert "PRODID:-//Radicale//NONSGML Radicale Server//EN" in answer
|
||||
|
||||
def test_add_event_todo(self):
|
||||
"""Tests the add of an event and todo."""
|
||||
@ -50,22 +50,22 @@ class BaseRequests(object):
|
||||
path = "/calendar.ics/02805f81-4cc2-4d68-8d39-72768ffa02d9.ics"
|
||||
status, headers, answer = self.request("PUT", path, event)
|
||||
assert status == 201
|
||||
assert u"ETag" in headers.keys()
|
||||
assert "ETag" in headers.keys()
|
||||
status, headers, answer = self.request("GET", path)
|
||||
assert status == 200
|
||||
assert u"VEVENT" in answer
|
||||
assert u"Nouvel évènement" in answer
|
||||
assert u"UID:02805f81-4cc2-4d68-8d39-72768ffa02d9" in answer
|
||||
assert "VEVENT" in answer
|
||||
assert "Nouvel évènement" in answer
|
||||
assert "UID:02805f81-4cc2-4d68-8d39-72768ffa02d9" in answer
|
||||
# VTODO test
|
||||
todo = get_file_content("putvtodo.ics")
|
||||
path = "/calendar.ics/40f8cf9b-0e62-4624-89a2-24c5e68850f5.ics"
|
||||
status, headers, answer = self.request("PUT", path, todo)
|
||||
assert status == 201
|
||||
assert u"ETag" in headers.keys()
|
||||
assert "ETag" in headers.keys()
|
||||
status, headers, answer = self.request("GET", path)
|
||||
assert u"VTODO" in answer
|
||||
assert u"Nouvelle tâche" in answer
|
||||
assert u"UID:40f8cf9b-0e62-4624-89a2-24c5e68850f5" in answer
|
||||
assert "VTODO" in answer
|
||||
assert "Nouvelle tâche" in answer
|
||||
assert "UID:40f8cf9b-0e62-4624-89a2-24c5e68850f5" in answer
|
||||
|
||||
def test_delete(self):
|
||||
"""Tests the deletion of an event"""
|
||||
@ -77,11 +77,11 @@ class BaseRequests(object):
|
||||
# Then we send a DELETE request
|
||||
status, headers, answer = self.request("DELETE", path)
|
||||
assert status == 200
|
||||
assert u"<href>%s</href>" % path in answer
|
||||
assert "<href>%s</href>" % path in answer
|
||||
status, headers, answer = self.request("GET", "/calendar.ics/")
|
||||
assert u"VEVENT" not in answer
|
||||
assert "VEVENT" not in answer
|
||||
|
||||
# Generates Classes with different configs
|
||||
# Generate classes with different configs
|
||||
cl_list = [FileSystem, MultiFileSystem, DataBaseSystem,
|
||||
GitFileSystem, GitMultiFileSystem]
|
||||
for cl in cl_list:
|
||||
|
Loading…
Reference in New Issue
Block a user