def test_file_executable(self):
     file_entry = inventory.make_entry('file', 'a file', None, 'file-id')
     file_entry.executable = True
     file_entry.text_sha1 = 'foo'
     file_entry.text_size = 10
     self.assertEqual('file\x0010\x00Y\x00foo',
         inventory_delta._file_content(file_entry))
 def test_file_executable(self):
     file_entry = inventory.make_entry('file', 'a file', None, 'file-id')
     file_entry.executable = True
     file_entry.text_sha1 = 'foo'
     file_entry.text_size = 10
     self.assertEqual('file\x0010\x00Y\x00foo',
                      inventory_delta._file_content(file_entry))
 def test_file_0_short_sha(self):
     file_entry = inventory.make_entry('file', 'a file', None, 'file-id')
     file_entry.text_sha1 = ''
     file_entry.text_size = 0
     self.assertEqual('file\x000\x00\x00',
         inventory_delta._file_content(file_entry))
 def test_file_0_short_sha(self):
     file_entry = inventory.make_entry('file', 'a file', None, 'file-id')
     file_entry.text_sha1 = ''
     file_entry.text_size = 0
     self.assertEqual('file\x000\x00\x00',
                      inventory_delta._file_content(file_entry))