"""
This module contains the testing framework for the display driver functionality, and is responsible for testing whether
the pi can correctly and sufficiently connect to the display.
"""

from mock import patch
from display_adapter.display_driver.display_drivers import DisplayDriver

class TestDisplayDriver(object):
    """
    This class tests the functionality of the DisplayDriver class, ensuring that it can correctly connect the raspberry
    pi to the display.
    """

    @patch("serial.Serial")
    def test_init(self, dc_mock):
        """
        This method tests initialisation of the display driver, ensuring it has correctly set up the database helper
        and the display controller.
        """
        dd = DisplayDriver()

        assert dd
        assert hasattr(dd, "_db_helper")
        assert hasattr(dd, "_display_controller")
@@ -207,16 +207,46 @@
 t patch%0A
+from datetime import datetime%0A
 from dis
@@ -295,16 +295,26 @@
 s import
+ minutify,
  Display
@@ -887,12 +887,503 @@
 controller%22)
+%0A%0A%0Adef test_minutify():%0A    %22%22%22%0A    This function tests the functionality of the minutify function linked to the Display Driver. The expected result%0A    of this test is for a datetime object to be made accurate to the minute.%0A    %22%22%22%0A%0A    dt = datetime.now().replace(second=30, microsecond=40000)%0A    accurate_dt = minutify(dt)%0A    # Assert the datetime object has been minutified correctly (seconds and microseconds == 0)%0A    assert accurate_dt.second == 0 and accurate_dt.microsecond == 0%0A

Test functionality has been added. Paired by Richard and Michael.