Commit ef3d2b6c authored by alexAubin's avatar alexAubin

Misc fixes following tests...

parent 053eab6f
......@@ -152,12 +152,12 @@ class Configuration(PolymorphicModel):
conf_list = [c.convert_to_dict_for_hook() for c in confs_to_update]
conf_list_csv = io.StringIO()
info_order = ["id", "offer_name", "offer_ref", "username"]
info_keys = conf_list[0].keys()
writer = csv.writer(conf_list_csv, delimiter=str(';'), quotechar=str('"'), quoting=csv.QUOTE_MINIMAL)
writer.writerow([key for key in info_keys])
for c in conf_list:
writer.writerow([c[info] for info in info_order])
writer.writerow([c[info] for info in info_keys])
conf_list_csv = conf_list_csv.getvalue()
success, out, err =, "FETCH_ALL_STATES", conf_list=conf_list, conf_list_csv=conf_list_csv)
if not success:
......@@ -168,7 +168,6 @@ class Configuration(PolymorphicModel):
assert isinstance(state_infos, dict) and "id" in state_infos, "Was expecting to get a list of dict as output of FETCH_ALL_STATES with at least 'id' in it"
conf_to_update = Configuration.objects.get(pk=state_infos.pop("id"))
print conf_to_update.__dict__
def get_state_icon_display(self):
......@@ -28,7 +28,7 @@ class ExternalAccountConfiguration(Configuration):
def convert_to_dict_for_hook(self):
d = super(ExternalAccountConfiguration, self).convert_to_dict_for_hook()
d["login"] = login
d["login"] = self.login
return d
class Meta:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment