motine / Ohouse

Ohouse
Other
3 stars 2 forks source link

Refactoring delegate tools to use static methods similar to apitools #40

Closed zanetworker closed 10 years ago

zanetworker commented 10 years ago

I saw that in the delegate tools several variables such as "JSON_COMMENT", "REQUIRED_METHOD_KEYS" , "GET_VERSION_FIELDS" are defined as class variables and then used as instance variables. Consequently, some methods which are meant as utils can not be defined as static. Therefore, in this pull request, these variables are used as class variables (since they were intended to), and some methods are converted to static methods. However, one variable namely "STATIC" is changed a lot inside the instance method so to avoid confusion, I have added it as an instance variable. Still, I think it should be used as class variable as it's value is defined once and never changes.

This pull request aims to close #2

zanetworker commented 10 years ago

There seems to be a test failing, I tried it with ma_tests.py but the failing test is in sa_tests.py (I am working on that now)

motine commented 10 years ago

@zanetworker good work.

zanetworker commented 10 years ago

@motine Thanks