/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to tests/test_push.py

Add initial test for push.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2010 Jelmer Vernooij <jelmer@samba.org>
 
2
# -*- coding: utf-8 -*-
 
3
#
 
4
# This program is free software; you can redistribute it and/or modify
 
5
# it under the terms of the GNU General Public License as published by
 
6
# the Free Software Foundation; either version 2 of the License, or
 
7
# (at your option) any later version.
 
8
#
 
9
# This program is distributed in the hope that it will be useful,
 
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
# GNU General Public License for more details.
 
13
#
 
14
# You should have received a copy of the GNU General Public License
 
15
# along with this program; if not, write to the Free Software
 
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 
 
18
"""Tests for pushing revisions from Bazaar into Git."""
 
19
 
 
20
from bzrlib.bzrdir import (
 
21
    format_registry,
 
22
    )
 
23
from bzrlib.repository import (
 
24
    InterRepository,
 
25
    )
 
26
from bzrlib.tests import (
 
27
    TestCase,
 
28
    TestCaseWithTransport,
 
29
    )
 
30
 
 
31
from bzrlib.plugins.git.push import (
 
32
    InterToGitRepository,
 
33
    )
 
34
 
 
35
 
 
36
class DpushTests(TestCaseWithTransport):
 
37
 
 
38
    def setUp(self):
 
39
        super(DpushTests, self).setUp()
 
40
        self.git_repo = self.make_repository("git",
 
41
                format=format_registry.make_bzrdir("git"))
 
42
        self.bzr_repo = self.make_repository("bzr")
 
43
        self.interrepo = InterRepository.get(self.bzr_repo, self.git_repo)
 
44
 
 
45
    def test_instance(self):
 
46
        self.assertIsInstance(self.interrepo, InterToGitRepository)
 
47