Ejemplo n.º 1
0
    def test_get_base_path_returns_set_base_path(self):
        endpoint = Endpoint()
        endpoint.id = 'name'
        endpoint.name = 'place'
        endpoint.base_path = '/m000'

        assert endpoint.get_base_path() == '/m000'
Ejemplo n.º 2
0
    def test_get_id_is_not_defined(self):
        endpoint = Endpoint()

        with pytest.raises(NotImplementedError):
            endpoint.get_id()
Ejemplo n.º 3
0
    def test_get_id_returns_set_id(self):
        endpoint = Endpoint()
        endpoint.id = 'name'
        endpoint.name = 'place'

        assert endpoint.get_id() == 'place'