Private instance vars, public get properties
This commit is contained in:
@@ -18,7 +18,6 @@ class ReadEntryTest(unittest.TestCase):
|
||||
self.assertEqual(entry.content, "")
|
||||
self.assertEqual(entry.id, self.test_id)
|
||||
self.assertEqual(entry.timestamp, self.test_timestamp)
|
||||
self.assertFalse(entry._read)
|
||||
|
||||
def test_single_read(self):
|
||||
"""Test reading content once"""
|
||||
@@ -28,10 +27,8 @@ class ReadEntryTest(unittest.TestCase):
|
||||
entry = ReadEntry(self.io_buffer, self.test_id, self.test_timestamp)
|
||||
entry.update()
|
||||
|
||||
# Verify content was read
|
||||
self.assertEqual(entry.content, test_input)
|
||||
self.assertTrue(entry._read)
|
||||
self.assertEqual(self.io_buffer.buffer_length(), 0) # Buffer should be cleared
|
||||
self.assertEqual(self.io_buffer.buffer_length(), 0)
|
||||
|
||||
def test_multiple_updates(self):
|
||||
"""Test that content is only read once even with multiple updates"""
|
||||
@@ -42,14 +39,11 @@ class ReadEntryTest(unittest.TestCase):
|
||||
entry.update()
|
||||
initial_content = entry.content
|
||||
|
||||
# Add more input and update again
|
||||
self.io_buffer.append_stdin("additional input")
|
||||
entry.update()
|
||||
entry.update()
|
||||
|
||||
# Verify content hasn't changed after first read
|
||||
self.assertEqual(entry.content, initial_content)
|
||||
self.assertTrue(entry._read)
|
||||
|
||||
def test_empty_input(self):
|
||||
"""Test reading when no input is available"""
|
||||
@@ -57,7 +51,6 @@ class ReadEntryTest(unittest.TestCase):
|
||||
entry.update()
|
||||
|
||||
self.assertEqual(entry.content, "")
|
||||
self.assertTrue(entry._read)
|
||||
|
||||
def test_special_characters(self):
|
||||
"""Test reading content with special characters"""
|
||||
|
||||
Reference in New Issue
Block a user