Ejemplo n.º 1
0
    def test_set_bytes_writable(self, m_sfw):
        # Using a relative filepath
        test_path = 'foo'
        test_bytes = six.b('test string of bytes')

        e = DataFileElement(test_path)
        e.set_bytes(test_bytes)

        # File write function should be called
        m_sfw.assert_called_once_with(test_path, test_bytes)
Ejemplo n.º 2
0
    def test_set_bytes_writable(self, m_sfw):
        # Using a relative filepath
        test_path = 'foo'
        test_bytes = six.b('test string of bytes')

        e = DataFileElement(test_path)
        e.set_bytes(test_bytes)

        # File write function should be called
        m_sfw.assert_called_once_with(test_path, test_bytes)