Esempio n. 1
0
 def test_calls_retrieve_and_parse_profile(self, mock_retrieve):
     mock_retrieve.return_value = Profile(guid="guidguidguidguid")
     attrs = {"handle": "foo"}
     attrs = DiasporaProfile.fill_extra_attributes(attrs)
     assert attrs == {"handle": "foo", "guid": "guidguidguidguid"}
Esempio n. 2
0
 def test_raises_if_no_handle(self):
     attrs = {"foo": "bar"}
     with pytest.raises(ValueError):
         DiasporaProfile.fill_extra_attributes(attrs)