~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testinv.py

  • Committer: Robert Collins
  • Date: 2005-10-03 14:47:12 UTC
  • mto: (1393.1.30)
  • mto: This revision was merged to the branch mainline in revision 1400.
  • Revision ID: robertc@robertcollins.net-20051003144712-44b3339bd5cfcf69
factor out file related logic from InventoryEntry to InventoryFile

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
class TestInventoryEntry(TestCaseInTempDir):
69
69
 
70
70
    def test_file_kind_character(self):
71
 
        file = InventoryEntry('123', 'hello.c', 'file', ROOT_ID)
 
71
        file = inventory.InventoryFile('123', 'hello.c', ROOT_ID)
72
72
        self.assertEqual(file.kind_character(), '')
73
73
 
74
74
    def test_dir_kind_character(self):
91
91
        self.assertEqual((False, False), right.detect_changes(left))
92
92
 
93
93
    def test_file_detect_changes(self):
94
 
        left = InventoryEntry('123', 'hello.c', 'file', ROOT_ID)
 
94
        left = inventory.InventoryFile('123', 'hello.c', ROOT_ID)
95
95
        left.text_sha1 = 123
96
 
        right = InventoryEntry('123', 'hello.c', 'file', ROOT_ID)
 
96
        right = inventory.InventoryFile('123', 'hello.c', ROOT_ID)
97
97
        right.text_sha1 = 123
98
98
        self.assertEqual((False, False), left.detect_changes(right))
99
99
        self.assertEqual((False, False), right.detect_changes(left))
119
119
        self.assertEqual((True, False), right.detect_changes(left))
120
120
 
121
121
    def test_file_has_text(self):
122
 
        file = InventoryEntry('123', 'hello.c', 'file', ROOT_ID)
 
122
        file = inventory.InventoryFile('123', 'hello.c', ROOT_ID)
123
123
        self.failUnless(file.has_text())
124
124
 
125
125
    def test_directory_has_text(self):