From fb079f12ea01e696e3c1f29120a5229bb4de638d Mon Sep 17 00:00:00 2001 From: ArtemIsmagilov Date: Thu, 21 Nov 2024 13:50:28 +0400 Subject: [PATCH] replace init classes on python3 --- tests/_test_absolute.py | 4 ++-- tests/proxy.py | 2 +- tests/test_caldav.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/_test_absolute.py b/tests/_test_absolute.py index 39cb83a1..df237a74 100644 --- a/tests/_test_absolute.py +++ b/tests/_test_absolute.py @@ -4,7 +4,7 @@ import caldav -class TestRadicale(object): +class TestRadicale: SUMMARIES = set( ( "Godspeed You! Black Emperor at " "Cirque Royal / Koninklijk Circus", @@ -35,7 +35,7 @@ def test_eventslist(self): assert dtstart == self.DTSTART -class TestTryton(object): +class TestTryton: def setup(self): URL = "http://admin:admin@localhost:9080/caldav/Calendars/Test" self.client = caldav.DAVClient(URL) diff --git a/tests/proxy.py b/tests/proxy.py index b74b543f..d3e2b0d6 100644 --- a/tests/proxy.py +++ b/tests/proxy.py @@ -248,7 +248,7 @@ def handler(signo, frame): def daemonize(logger): - class DevNull(object): + class DevNull: def __init__(self): self.fd = os.open("/dev/null", os.O_WRONLY) diff --git a/tests/test_caldav.py b/tests/test_caldav.py index 05314bf9..21663620 100644 --- a/tests/test_caldav.py +++ b/tests/test_caldav.py @@ -437,7 +437,7 @@ len(rfc6638_users) < 3, reason="need at least three users in rfc6638_users to be set in order to run this test", ) -class TestScheduling(object): +class TestScheduling: """Testing support of RFC6638. TODO: work in progress. Stalled a bit due to lack of proper testing accounts. I haven't managed to get this test to pass at any systems yet, but I believe the problem is not on the library side. * icloud: cannot really test much with only one test account @@ -554,7 +554,7 @@ def testInviteAndRespond(self): ## inbox/outbox? -class RepeatedFunctionalTestsBaseClass(object): +class RepeatedFunctionalTestsBaseClass: """This is a class with functional tests (tests that goes through basic functionality and actively communicates with third parties) that we want to repeat for all configured caldav_servers.