Exemplo n.º 1
0
    def test_repr(self):
        resolwe_mock = MagicMock(spec=Resolwe, url='www.abc.com')

        resolwe_mock.auth = MagicMock(username='******')
        rep = Resolwe.__repr__(resolwe_mock)
        self.assertEqual(rep, 'Resolwe <url: www.abc.com, username: user>')

        resolwe_mock.auth = MagicMock(username=None)
        rep = Resolwe.__repr__(resolwe_mock)
        self.assertEqual(rep, 'Resolwe <url: www.abc.com>')
Exemplo n.º 2
0
    def test_repr(self):
        resolwe_mock = MagicMock(spec=Resolwe, url='www.abc.com')

        resolwe_mock.auth = MagicMock(username='******')
        rep = Resolwe.__repr__(resolwe_mock)
        self.assertEqual(rep, 'Resolwe <url: www.abc.com, username: user>')

        resolwe_mock.auth = MagicMock(username=None)
        rep = Resolwe.__repr__(resolwe_mock)
        self.assertEqual(rep, 'Resolwe <url: www.abc.com>')
Exemplo n.º 3
0
    def test_repr(self):
        resolwe_mock = MagicMock(spec=Resolwe, url="www.abc.com")

        resolwe_mock.auth = MagicMock(username="******")
        rep = Resolwe.__repr__(resolwe_mock)
        self.assertEqual(rep, "Resolwe <url: www.abc.com, username: user>")

        resolwe_mock.auth = MagicMock(username=None)
        rep = Resolwe.__repr__(resolwe_mock)
        self.assertEqual(rep, "Resolwe <url: www.abc.com>")