The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit daa513be authored by Roger Philibert's avatar Roger Philibert

woob: a few more renames

parent 58ae46d4
Pipeline #3713 passed with stages
in 64 minutes and 45 seconds
......@@ -7,7 +7,7 @@ def genapi():
os.system('rm -rf api')
os.system('mkdir api')
os.chdir('api')
for root, dirs, files in os.walk('../../../weboob/'):
for root, dirs, files in os.walk('../../../woob/'):
root = root.split('/', 4)[-1]
if root.startswith('applications') or root.startswith('__'):
continue
......
......@@ -73,7 +73,7 @@ def js2args(self, s):
sub = re.search('oamSubmitForm.+?,\'([^:]+).([^\']+)', s)
args['%s:_idcl' % sub.group(1)] = "%s:%s" % (sub.group(1), sub.group(2))
args['%s_SUBMIT' % sub.group(1)] = 1
args['_form_name'] = sub.group(1) # for weboob only
args['_form_name'] = sub.group(1) # for woob only
return args
......
......@@ -48,7 +48,7 @@ def test_get_content(self):
def test_push_content(self):
content = self.backend.get_content(u"Ceci-est-un-test")
content.content = "test " + str(datetime.now())
self.backend.push_content(content, message="test weboob", minor=True)
self.backend.push_content(content, message="test woob", minor=True)
@skip_without_config("username")
def test_content_preview(self):
......
......@@ -29,14 +29,14 @@ class GithubTest(BackendTest):
MODULE = 'github'
def test_project(self):
project = self.backend.get_project('weboobie/testing')
project = self.backend.get_project('test-woob/testing')
assert project
self.assertEqual(project.name, 'testing')
self.assertEqual(project.id, 'weboobie/testing')
self.assertEqual(project.id, 'test-woob/testing')
assert all(isinstance(user, User) for user in project.members)
assert any(user.name == 'weboobie' for user in project.members)
assert any(user.name == 'test-woob' for user in project.members)
assert all(isinstance(version, Version) for version in project.versions)
assert any(version.name == u'1.0' for version in project.versions)
......@@ -45,10 +45,10 @@ def test_project(self):
assert project.find_status('closed').value == Status.VALUE_RESOLVED
def test_get_issue(self):
issue = self.backend.get_issue('weboobie/testing/1')
issue = self.backend.get_issue('test-woob/testing/1')
assert issue
self.assertEqual(issue.id, 'weboobie/testing/1')
self.assertEqual(issue.id, 'test-woob/testing/1')
self.assertEqual(issue.title, 'an open issue')
assert 'Hello' in issue.body
assert issue.creation
......@@ -57,7 +57,7 @@ def test_get_issue(self):
def test_search(self):
query = Query()
query.project = 'weboobie/testing'
query.project = 'test-woob/testing'
query.status = 'closed'
query.title = 'fix'
issues = iter(self.backend.iter_issues(query))
......@@ -67,7 +67,7 @@ def test_search(self):
@skip_without_config('username', 'password')
def test_post_issue(self):
project = self.backend.get_project('weboobie/testing')
project = self.backend.get_project('test-woob/testing')
assert project
issue = self.backend.create_issue(project.id)
......@@ -85,7 +85,7 @@ def test_post_issue(self):
@skip_without_config('username', 'password')
def test_post_comment(self):
issue = self.backend.get_issue('weboobie/testing/26')
issue = self.backend.get_issue('test-woob/testing/26')
assert issue
ts = str(int(time()))
......@@ -93,12 +93,12 @@ def test_post_comment(self):
update.message = "Yes! It's now %s" % ts
self.backend.update_issue(issue, update)
new = self.backend.get_issue('weboobie/testing/26')
new = self.backend.get_issue('test-woob/testing/26')
assert any(ts in upd.message for upd in new.history)
@skip_without_config('username', 'password')
def test_change_status(self):
issue = self.backend.get_issue('weboobie/testing/30')
issue = self.backend.get_issue('test-woob/testing/30')
assert issue
closing = (issue.status.name != 'closed')
......@@ -109,7 +109,7 @@ def test_change_status(self):
self.backend.post_issue(issue)
new = self.backend.get_issue('weboobie/testing/30')
new = self.backend.get_issue('test-woob/testing/30')
if closing:
self.assertEqual(new.status.name, 'closed')
else:
......
......@@ -37,7 +37,7 @@ def test_push_content(self):
content = self.backend.get_content(u"Project:Sandbox")
content.content = "%s\nhello %s" % (content.content, datetime.now())
# ^ warning: wikipedia seems to have blocked lines starting with "test"...
self.backend.push_content(content, message="test weboob", minor=True)
self.backend.push_content(content, message="test woob", minor=True)
new_content = self.backend.get_content(u"Project:Sandbox")
self.assertEquals(content.content, new_content.content)
......
......@@ -46,7 +46,7 @@ def _get_paste(self, _id):
@skip_without_config()
def test_post(self):
p = self.backend.new_paste(None, title=u'ouiboube', contents=u'Weboob Test héhéhé')
p = self.backend.new_paste(None, title=u'ouiboube', contents=u'Woob Test héhéhé')
self.backend.post_paste(p, max_age=3600*24)
assert p.id
self.backend.fill_paste(p, ['title'])
......
......@@ -49,7 +49,7 @@ def test_get_paste(self):
def test_post(self):
# we cannot test public pastes, as the website sometimes forces them as private
# there seems to be a very low post per day limit, even when logged in
p = self.backend.new_paste(None, title=u'ouiboube', contents=u'Weboob Test', public=False)
p = self.backend.new_paste(None, title=u'ouiboube', contents=u'Woob Test', public=False)
try:
self.backend.post_paste(p, max_age=600)
except LimitExceeded:
......@@ -63,7 +63,7 @@ def test_post(self):
def test_specialchars(self):
# post a paste and get the contents through the HTML response
p1 = self.backend.new_paste(None, title=u'ouiboube', contents=u'Weboob <test>¿¡', public=False)
p1 = self.backend.new_paste(None, title=u'ouiboube', contents=u'Woob <test>¿¡', public=False)
try:
self.backend.post_paste(p1, max_age=600)
except LimitExceeded:
......
......@@ -57,7 +57,7 @@ def test_browse(self):
self.assertTrue(video.id, 'ID for video not found')
def test_missing_duration(self):
videos = self.backend.search_videos('weboob')
videos = self.backend.search_videos('woob')
self.assertTrue(videos)
for video in videos:
self.assertTrue(video.id, 'ID for video not found')
......
......@@ -55,7 +55,7 @@ def iter_pocket(self, account):
def get_profile(self):
return self.browser.get_profile()
# From weboob.capabilities.bill.CapDocument
# From woob.capabilities.bill.CapDocument
def iter_subscription(self):
"""Fake subscription - documents are attached to a subscription."""
sub = Subscription()
......@@ -63,19 +63,19 @@ def iter_subscription(self):
sub.label = u'Relevés électroniques / e-statements'
yield sub
# From weboob.capabilities.bill.CapDocument
# From woob.capabilities.bill.CapDocument
def get_subscription(self, _id):
return find_object(self.iter_subscription(), id=_id, error=SubscriptionNotFound)
# From weboob.capabilities.bill.CapDocument
# From woob.capabilities.bill.CapDocument
def iter_documents(self, subscription):
return self.browser.iter_documents()
# From weboob.capabilities.bill.CapDocument
# From woob.capabilities.bill.CapDocument
def get_document(self, _id):
return find_object(self.iter_documents(None), id=_id, error=DocumentNotFound)
# From weboob.capabilities.bill.CapDocument
# From woob.capabilities.bill.CapDocument
def download_document(self, document):
if not isinstance(document, Document):
document = self.get_document(document)
......@@ -83,7 +83,7 @@ def download_document(self, document):
return
return self.browser.open(document.url).content
# From weboob.capabilities.collection.CapCollection
# From woob.capabilities.collection.CapCollection
def iter_resources(self, objs, split_path):
"""Merging implementation from CapDocument and CapBank."""
if Account in objs:
......
......@@ -35,7 +35,7 @@ def _get_paste(self, _id):
assert p.public is False
def test_post(self):
p = self.backend.new_paste(None, contents=u'Weboob Test héhéhé')
p = self.backend.new_paste(None, contents=u'Woob Test héhéhé')
self.backend.post_paste(p, max_age=False)
assert p.id
self.backend.fill_paste(p, ['title'])
......
......@@ -51,13 +51,13 @@ def test_ls_me(self):
raise SkipTest("User credentials not defined")
def test_ls_search(self):
l = list(itertools.islice(self.backend.iter_resources([BaseObject], ['search', 'weboob']), 0, 20))
l = list(itertools.islice(self.backend.iter_resources([BaseObject], ['search', 'woob']), 0, 20))
assert len(l)
thread = self.backend.get_thread(l[0].id)
assert len(thread.root.content)
def test_ls_hashtag(self):
l = list(itertools.islice(self.backend.iter_resources([BaseObject], ['hashtags', 'weboob']), 0, 20))
l = list(itertools.islice(self.backend.iter_resources([BaseObject], ['hashtags', 'woob']), 0, 20))
assert len(l)
thread = self.backend.get_thread(l[0].id)
assert len(thread.root.content)
......
......@@ -25,7 +25,7 @@ class ZerobinTest(BackendTest):
MODULE = 'zerobin'
def test_writeread(self):
p = self.backend.new_paste(_id=None, contents='weboob test')
p = self.backend.new_paste(_id=None, contents='woob test')
self.backend.browser.post_paste(p, 86400)
assert p.url
......@@ -33,7 +33,7 @@ def test_writeread(self):
assert p.title
p2 = self.backend.get_paste(p.id)
self.assertEqual(p2.contents, 'weboob test')
self.assertEqual(p2.contents, 'woob test')
assert p.url.startswith(self.backend.browser.BASEURL)
self.assertEqual(p.url, p2.url)
self.assertEqual(p.id, p2.id)
......
......@@ -30,7 +30,7 @@
PY3 = sys.version_info.major >= 3
def install_weboob():
def install_woob():
packages = set(find_packages(exclude=['modules', 'modules.*']))
data_files = [
......@@ -63,11 +63,11 @@ def install_weboob():
)
if os.getenv('WEBOOB_SETUP'):
args = os.getenv('WEBOOB_SETUP').split()
if os.getenv('WOOB_SETUP'):
args = os.getenv('WOOB_SETUP').split()
else:
args = sys.argv[1:]
sys.argv = [sys.argv[0]] + args
install_weboob()
install_woob()
......@@ -30,7 +30,7 @@ def files_to_check(args, pattern=None):
to_check = get_lines([
'git', 'grep', '-l', pattern,
git_root / 'modules/**/*.py', # git will interpret wildcards by itself
git_root / 'weboob/**/*.py',
git_root / 'woob/**/*.py',
])
except subprocess.CalledProcessError as exc:
if exc.returncode != 1:
......
......@@ -8,7 +8,7 @@
import datetime
from subprocess import check_call, check_output
from weboob.tools.misc import to_unicode
from woob.tools.misc import to_unicode
WORKTREE = 'release_tmp'
......
......@@ -14,8 +14,8 @@
from termcolor import colored
STABLE_VERSION = getenv('WEBOOB_BACKPORT_STABLE', '1.3')
DEVEL_BRANCH = getenv('WEBOOB_BACKPORT_DEVEL', 'master')
STABLE_VERSION = getenv('WOOB_BACKPORT_STABLE', '1.3')
DEVEL_BRANCH = getenv('WOOB_BACKPORT_DEVEL', 'master')
@contextmanager
......@@ -43,7 +43,7 @@ def create_compat_dir(name):
MANUAL_PORTS = [
'weboob.tools.captcha.virtkeyboard',
'woob.tools.captcha.virtkeyboard',
]
MANUAL_PORT_DIR = path.join(path.dirname(__file__), 'stable_backport_data')
......@@ -60,8 +60,8 @@ def __repr__(self):
return '<%s filename=%r linenum=%s message=%r>' % (type(self).__name__, self.filename, self.linenum, self.message)
def reimport_module(self, module):
# not a weboob module, probably a false positive.
if not module.startswith('weboob'):
# not a woob module, probably a false positive.
if not module.startswith('woob'):
return
dirname = module.replace('.', '/')
......@@ -102,8 +102,8 @@ def reimport_module(self, module):
fp.write('%s\n' % line)
# Particular case, in devel some imports have been added to
# weboob/browser/__init__.py
system(r'sed -i -e "s/from weboob.browser import/from weboob.browser.browsers import/g" %s'
# woob/browser/__init__.py
system(r'sed -i -e "s/from woob.browser import/from woob.browser.browsers import/g" %s'
% self.filename)
# Replace import to this module by a relative import to the copy in
# compat/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment