Remove dependence on heat.common
Change-Id: I6b13b184edbc51a48633c82ce2db9814c9f7e2ce
diff --git a/heat_tempest_plugin/common/test.py b/heat_tempest_plugin/common/test.py
index d719ad0..97d8d8c 100644
--- a/heat_tempest_plugin/common/test.py
+++ b/heat_tempest_plugin/common/test.py
@@ -60,6 +60,12 @@
return False
+def isotime(at):
+ if at is None:
+ return None
+ return at.strftime('%Y-%m-%dT%H:%M:%SZ')
+
+
def rand_name(name=''):
randbits = six.text_type(random.randint(1, 0x7fffffff))
if name:
diff --git a/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py b/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py
index 97e5c8d..3108c1e 100644
--- a/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py
+++ b/heat_tempest_plugin/tests/scenario/test_aodh_alarm.py
@@ -11,7 +11,6 @@
# under the License.
import datetime
-from heat.common import timeutils
from oslo_log import log as logging
from heat_tempest_plugin.common import test
@@ -48,8 +47,9 @@
parameters = {'metric_id': metric['id']}
stack_identifier = self.stack_create(template=self.template,
parameters=parameters)
- measures = [{'timestamp': timeutils.isotime(datetime.datetime.now()),
- 'value': 100}, {'timestamp': timeutils.isotime(
+
+ measures = [{'timestamp': test.isotime(datetime.datetime.now()),
+ 'value': 100}, {'timestamp': test.isotime(
datetime.datetime.now() + datetime.timedelta(
minutes=1)), 'value': 100}]
# send measures(should cause the alarm to fire)