Changeset - be16b9bedb4d
[Not reviewed]
0 2 0
Lance Edgar (lance) - 3 months ago 2024-07-11 18:22:56
lance@edbob.org
fix: remove duplicate method for `RattailConfig.production()`

since it now is defined in `WuttaConfig`
2 files changed with 0 insertions and 17 deletions:
0 comments (0 inline, 0 general)
rattail/config.py
Show inline comments
 
@@ -262,13 +262,6 @@ class RattailConfig(WuttaConfig):
 
        # warnings.warn("config.beaker_invalidate_setting() method is deprecated",
 
        #               DeprecationWarning, stacklevel=2)
 

	
 
    def production(self):
 
        """
 
        Returns boolean indicating whether the app is running in
 
        production mode
 
        """
 
        return self.getbool('rattail', 'production', default=False)
 

	
 
    def node_type(self, default=None):
 
        """
 
        Returns the "type" of current node as string.  What this means
tests/test_config.py
Show inline comments
 
@@ -155,16 +155,6 @@ require = %(here)s/first.conf
 
        myconfig = config.RattailConfig()
 
        myconfig.beaker_invalidate_setting('foo')
 

	
 
    def test_production(self):
 
        myconfig = config.RattailConfig()
 

	
 
        # false if not defined
 
        self.assertFalse(myconfig.production())
 

	
 
        # but config may specify
 
        myconfig.setdefault('rattail.production', 'true')
 
        self.assertTrue(myconfig.production())
 

	
 
    def test_node_type(self):
 
        myconfig = config.RattailConfig()
 

	
0 comments (0 inline, 0 general)