APIBaseTest
contains no test methods 40TEST_SCREENSHOT = get_test_file("screenshot.png")
41
42
43class APIBaseTest(APITestCase, RepoTestMixin): 44 CREATE_GLOSSARIES: bool = True
45
46 @classmethod
VCSSubversionBranchTest
contains no test methods1750 )
1751
1752
1753class VCSSubversionBranchTest(VCSSubversionTest):1754 """Cloning subversion branch directly."""
1755
1756 def clone_test_repos(self) -> None:
VCSGitUpstreamTest
contains no test methods 511 _class = GitForcePushRepository
512
513
514class VCSGitUpstreamTest(VCSGitTest): 515 def add_remote_commit(self, conflict=False, rename=False) -> None:
516 # Use Git to create changed upstream repo
517 backup = self._class
VCSGitForcePushTest
contains no test methods 507 self.assertEqual(self._remote_branch, self.repo.get_remote_branch(self.tempdir))
508
509
510class VCSGitForcePushTest(VCSGitTest): 511 _class = GitForcePushRepository
512
513
RegistrationTestMixin
contains no test methods 36from weblate.utils.xml import parse_xml
37
38
39class RegistrationTestMixin(TestCase): 40 """Helper to share code for registration testing."""
41
42 def assert_registration_mailbox(self, match=None):
Test methods should always start with the test
. If there are no such methods,
the class overriding unittest.TestCase
won't run any test.
Not preferred:
import unittest
def Tests(unittest.TestCase):
def my_test(self, arg1, arg2):
self.assertEquals(arg1, arg2)
Preferred:
import unittest
def Tests(unittest.TestCase):
def test_something(self, arg1, arg2):
self.assertEquals(arg1, arg2)