def test_add_repo_signed_by(self):
        """Add repo and key, using the signed-by method rather than apt-key"""
        a = apt_get(keys=['https://www.example.com/key.pub'],
                    ospackages=['example'],
                    repositories=['deb [signed-by=/usr/share/keyrings/key.gpg] http://www.example.com all main'])
        self.assertEqual(str(a),
r'''RUN mkdir -p /usr/share/keyrings && \
    rm -f /usr/share/keyrings/key.gpg && \
    wget -qO - https://www.example.com/key.pub | gpg --dearmor -o /usr/share/keyrings/key.gpg && \
    echo "deb [signed-by=/usr/share/keyrings/key.gpg] http://www.example.com all main" >> /etc/apt/sources.list.d/hpccm.list && \
    apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
        example && \
    rm -rf /var/lib/apt/lists/*''')
Add repo and key, using the signed-by method rather than apt-key
test/test_apt_get.py