
import os
import unittest
from stonemason.service.tileserver import AppBuilder


class TestExample(unittest.TestCase):
    def setUp(self):
        os.environ['EXAMPLE_APP_ENV'] = 'dev'

        app = AppBuilder().build()
        self.client = app.test_client()

    def test_app(self):
        resp = self.client.get('/')
        self.assertEqual(b'Hello World!', resp.data)


import os
import unittest
from stonemason.service.tileserver import AppBuilder


class TestExample(unittest.TestCase):
    def setUp(self):
        os.environ['EXAMPLE_APP_MODE'] = 'development'

        app = AppBuilder().build(config='settings.py')
        self.client = app.test_client()

    def test_app(self):
        resp = self.client.get('/')
        self.assertEqual(b'Hello World!', resp.data)

Update tests for the test app
TEST: Update tests for the test app

  
  import os
  import unittest
  from stonemason.service.tileserver import AppBuilder
  
  
  class TestExample(unittest.TestCase):
      def setUp(self):
-         os.environ['EXAMPLE_APP_ENV'] = 'dev'
+         os.environ['EXAMPLE_APP_MODE'] = 'development'
  
-         app = AppBuilder().build()
+         app = AppBuilder().build(config='settings.py')
          self.client = app.test_client()
  
      def test_app(self):
          resp = self.client.get('/')
          self.assertEqual(b'Hello World!', resp.data)
  
Update tests for the test app
## Code Before:

import os
import unittest
from stonemason.service.tileserver import AppBuilder


class TestExample(unittest.TestCase):
    def setUp(self):
        os.environ['EXAMPLE_APP_ENV'] = 'dev'

        app = AppBuilder().build()
        self.client = app.test_client()

    def test_app(self):
        resp = self.client.get('/')
        self.assertEqual(b'Hello World!', resp.data)

## Instruction:
Update tests for the test app
## Code After:

import os
import unittest
from stonemason.service.tileserver import AppBuilder


class TestExample(unittest.TestCase):
    def setUp(self):
        os.environ['EXAMPLE_APP_MODE'] = 'development'

        app = AppBuilder().build(config='settings.py')
        self.client = app.test_client()

    def test_app(self):
        resp = self.client.get('/')
        self.assertEqual(b'Hello World!', resp.data)
