文件操作 - test_jabberjstrports.py
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/twisted/words/test/test_jabberjstrports.py
编辑文件内容
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.jabber.jstrports}. """ from twisted.application.internet import TCPClient from twisted.trial import unittest from twisted.words.protocols.jabber import jstrports class JabberStrPortsPlaceHolderTests(unittest.TestCase): """ Tests for L{jstrports} """ def test_parse(self): """ L{jstrports.parse} accepts an endpoint description string and returns a tuple and dict of parsed endpoint arguments. """ expected = ("TCP", ("DOMAIN", 65535, "Factory"), {}) got = jstrports.parse("tcp:DOMAIN:65535", "Factory") self.assertEqual(expected, got) def test_client(self): """ L{jstrports.client} returns a L{TCPClient} service. """ got = jstrports.client("tcp:DOMAIN:65535", "Factory") self.assertIsInstance(got, TCPClient)
修改文件时间
将文件时间修改为当前时间的前一年
删除文件