code stringlengths 3 6.57k |
|---|
list(self.repo.log(self.repo.head, 'README', id_only=True, limit=25) |
assert_equal(commits, [3, 1]) |
list(self.repo.log(1, 'README', id_only=True, limit=25) |
assert_equal(commits, [1]) |
list(self.repo.log(self.repo.head, 'a/b/c/', id_only=True, limit=25) |
assert_equal(commits, [4, 2]) |
list(self.repo.log(3, 'a/b/c/', id_only=True, limit=25) |
assert_equal(commits, [2]) |
list(self.repo.log(self.repo.head, 'does/not/exist', id_only=True, limit=25) |
test_notification_email(self) |
setup_global_objects() |
h.set_context('test', 'src', neighborhood='Projects') |
self.repo.refresh() |
ThreadLocalORMSession.flush_all() |
send_notifications(self.repo, [self.repo.rev_to_commit_id(1) |
ThreadLocalORMSession.flush_all() |
M.Notification.query.find({'subject': '[test:src] New commit [r1] by rick446'}) |
first() |
assert_in('By rick446', n.text) |
assert_in('Create readme', n.text) |
_Test(unittest.TestCase) |
count() |
_make_tree(self, object_id, **kwargs) |
M.repository.Tree.upsert(object_id) |
getattr(self, 'repo', None) |
six.iteritems(kwargs) |
isinstance(v, six.string_types) |
next(self.idgen) |
self._make_tree(next(self.idgen) |
session(t) |
flush() |
_make_commit(self, object_id, **tree_parts) |
M.repository.Commit.upsert(object_id) |
datetime.utcnow() |
dt.replace(microsecond=dt.microsecond // 1000 * 1000) |
ci.set_context(self.repo) |
self._make_tree(ci.tree_id, **tree_parts) |
_make_log(self, ci) |
session(ci) |
flush(ci) |
setUp(self) |
setup_basic_test() |
setup_global_objects() |
ThreadLocalORMSession.flush_all() |
ThreadLocalORMSession.close_all() |
tg.config.get('scm.repos.root', '/') |
_TestWithRepo(_Test) |
setUp(self) |
super(_TestWithRepo, self) |
setUp() |
h.set_context('test', neighborhood='Projects') |
c.project.install_app('svn', 'test1') |
h.set_context('test', 'test1', neighborhood='Projects') |
M.Repository(name='test1', tool='svn') |
mock.Mock(spec=M.RepositoryImplementation() |
self.repo._impl.commit() |
ThreadLocalORMSession.flush_all() |
_TestWithRepoAndCommit(_TestWithRepo) |
setUp(self) |
super(_TestWithRepoAndCommit, self) |
setUp() |
self._make_commit('foo') |
ThreadLocalORMSession.flush_all() |
ThreadLocalORMSession.close_all() |
TestRepo(_TestWithRepo) |
test_create(self) |
os.path.join(self.prefix, 'svn/p/test/') |
test_passthrough(self) |
getattr(self.repo, fn) |
getattr(self.repo._impl, fn) |
assert_called_with() |
getattr(self.repo, fn) |
getattr(self.repo._impl, fn) |
assert_called_with('foo') |
test_shorthand_for_commit(self) |
self.repo.shorthand_for_commit('a' * 40) |
test_url_for_commit(self) |
self.repo.url_for_commit('a' * 40) |
mock.patch('allura.model.repository.g.post_event') |
test_init_as_clone(self, post_event) |
self.repo.init_as_clone('srcpath', 'srcname', 'srcurl') |
self.repo._impl.clone_from.called_with('srcpath') |
post_event.assert_called_once_with('repo_cloned', 'srcurl', 'srcpath') |
test_latest(self) |
mock.Mock() |
mock.Mock(return_value=ci) |
self.repo.latest() |
test_index(self) |
self.repo.index() |
test_scm_host_url(self) |
assert_equal(self.repo.clone_url('rw', 'nobody') |
assert_equal(self.repo.clone_url('https', 'nobody') |
h.push_config(self.repo.app.config.options, external_checkout_url='https://$username@foo.com/') |
assert_equal(self.repo.clone_url('https', 'user') |
test_guess_type(self) |
self.repo.guess_type('foo.txt') |
self.repo.guess_type('foo.gbaer') |
self.repo.guess_type('foo.html') |
self.repo.guess_type('.gitignore') |
test_refresh(self) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.